mirror of
https://github.com/ahwootech/BRUTAL.git
synced 2026-11-26 21:18:24 +01:00
first
This commit is contained in:
parent
bd62d51ec9
commit
b578433e37
1 changed files with 784842 additions and 0 deletions
21
Brutal.Sdl/Manual/Libraries/Sdl.Init.cs
Normal file
21
Brutal.Sdl/Manual/Libraries/Sdl.Init.cs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue