Skip to content

Commit 4538c59

Browse files
Update sdl.inc (ver. 2.0.14)
1 parent bf97509 commit 4538c59

File tree

1 file changed

+29
-22
lines changed

1 file changed

+29
-22
lines changed

sdl.inc

Lines changed: 29 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,37 @@
11
//from "sdl.h"
22

3-
const
3+
type
4+
TSDL_Init = type UInt32;
45

5-
SDL_INIT_TIMER = $00000001;
6+
const
7+
SDL_INIT_TIMER = TSDL_Init($00000001);
68
{$EXTERNALSYM SDL_INIT_TIMER}
7-
SDL_INIT_AUDIO = $00000010;
9+
SDL_INIT_AUDIO = TSDL_Init($00000010);
810
{$EXTERNALSYM SDL_INIT_AUDIO}
9-
SDL_INIT_VIDEO = $00000020; // SDL_INIT_VIDEO implies SDL_INIT_EVENTS
11+
SDL_INIT_VIDEO = TSDL_Init($00000020); // SDL_INIT_VIDEO implies SDL_INIT_EVENTS
1012
{$EXTERNALSYM SDL_INIT_VIDEO}
11-
SDL_INIT_JOYSTICK = $00000200; // SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS
13+
SDL_INIT_JOYSTICK = TSDL_Init($00000200); // SDL_INIT_JOYSTICK implies SDL_INIT_EVENTS
1214
{$EXTERNALSYM SDL_INIT_JOYSTICK}
13-
SDL_INIT_HAPTIC = $00001000;
15+
SDL_INIT_HAPTIC = TSDL_Init($00001000);
1416
{$EXTERNALSYM SDL_INIT_HAPTIC}
15-
SDL_INIT_GAMECONTROLLER = $00002000; //turn on game controller also implicitly does JOYSTICK
16-
{$EXTERNALSYM SDL_INIT_GAMECONTROLLER}// SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK
17-
SDL_INIT_EVENTS = $00004000;
17+
SDL_INIT_GAMECONTROLLER = TSDL_Init($00002000); //turn on game controller also implicitly does JOYSTICK
18+
{$EXTERNALSYM SDL_INIT_GAMECONTROLLER} // SDL_INIT_GAMECONTROLLER implies SDL_INIT_JOYSTICK
19+
SDL_INIT_EVENTS = TSDL_Init($00004000);
1820
{$EXTERNALSYM SDL_INIT_EVENTS}
19-
SDL_INIT_NOPARACHUTE = $00100000; //Don't catch fatal signals
20-
{$EXTERNALSYM SDL_INIT_NOPARACHUTE} // compatibility; this flag is ignored.
21-
SDL_INIT_EVERYTHING = SDL_INIT_TIMER or
22-
SDL_INIT_AUDIO or
23-
SDL_INIT_VIDEO or
24-
SDL_INIT_EVENTS or
25-
SDL_INIT_JOYSTICK or
26-
SDL_INIT_HAPTIC or
27-
SDL_INIT_GAMECONTROLLER;
21+
SDL_INIT_SENSOR = TSDL_Init($00008000);
22+
{$EXTERNALSYM SDL_INIT_SENSOR}
23+
SDL_INIT_NOPARACHUTE = TSDL_Init($00100000); //Don't catch fatal signals
24+
{$EXTERNALSYM SDL_INIT_NOPARACHUTE} // compatibility; this flag is ignored.
25+
SDL_INIT_EVERYTHING = TSDL_Init(
26+
SDL_INIT_TIMER or
27+
SDL_INIT_AUDIO or
28+
SDL_INIT_VIDEO or
29+
SDL_INIT_EVENTS or
30+
SDL_INIT_JOYSTICK or
31+
SDL_INIT_HAPTIC or
32+
SDL_INIT_GAMECONTROLLER or
33+
SDL_INIT_SENSOR
34+
);
2835
{$EXTERNALSYM SDL_INIT_EVERYTHING}
2936

3037
{**
@@ -33,19 +40,19 @@ const
3340
* signal handlers for some commonly ignored fatal signals (like SIGSEGV).
3441
*}
3542

36-
function SDL_Init(flags: UInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Init' {$ENDIF} {$ENDIF};
43+
function SDL_Init(flags: TSDL_Init): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_Init' {$ENDIF} {$ENDIF};
3744

3845
{**
3946
* This function initializes specific SDL subsystems
4047
*}
4148

42-
function SDL_InitSubSystem(flags: UInt32): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_InitSubSystem' {$ENDIF} {$ENDIF};
49+
function SDL_InitSubSystem(flags: TSDL_Init): SInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_InitSubSystem' {$ENDIF} {$ENDIF};
4350

4451
{**
4552
* This function cleans up specific SDL subsystems
4653
*}
4754

48-
procedure SDL_QuitSubSystem(flags: UInt32) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QuitSubSystem' {$ENDIF} {$ENDIF};
55+
procedure SDL_QuitSubSystem(flags: TSDL_Init) cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_QuitSubSystem' {$ENDIF} {$ENDIF};
4956

5057
{**
5158
* This function returns a mask of the specified subsystems which have
@@ -54,7 +61,7 @@ procedure SDL_QuitSubSystem(flags: UInt32) cdecl; external SDL_LibName {$IFDEF D
5461
* If flags is 0, it returns a mask of all initialized subsystems.
5562
*}
5663

57-
function SDL_WasInit(flags: UInt32): UInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WasInit' {$ENDIF} {$ENDIF};
64+
function SDL_WasInit(flags: TSDL_Init): UInt32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_WasInit' {$ENDIF} {$ENDIF};
5865

5966
{**
6067
* This function cleans up all initialized subsystems. You should

0 commit comments

Comments
 (0)