mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-25 20:48:24 +01:00
21 lines
570 B
C#
21 lines
570 B
C#
namespace Brutal.SdlApi;
|
|
|
|
public static unsafe partial class Sdl
|
|
{
|
|
public static unsafe partial class Init
|
|
{
|
|
public static void Initialize(SdlInitFlags flags)
|
|
{
|
|
// SDL_Init returns SDL bool (false = failure), rendered as a byte by the raw layer.
|
|
if (PInvoke.Init(flags) == 0)
|
|
throw SdlException.FromError("SDL_Init failed");
|
|
}
|
|
|
|
public static void Quit()
|
|
{
|
|
Events.ClearWatches();
|
|
Sdl.ExceptionAggregator.Clear();
|
|
PInvoke.Quit();
|
|
}
|
|
}
|
|
}
|