Skip to content

Commit 150761f

Browse files
ADD: SDL_PumpEvents to port
1 parent 1d87255 commit 150761f

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

units/sdl_runtime_linking.inc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -911,6 +911,8 @@ Begin
911911
{$ENDIF}
912912
SDL_IsTablet := TSDL_IsTablet_func(GetProcAddress(LibHandle, 'SDL_IsTablet'));
913913
If Not assigned(SDL_IsTablet) Then result := false;
914+
SDL_PumpEvents := TSDL_PumpEvents_proc(GetProcAddress(LibHandle, 'SDL_PumpEvents'));
915+
If Not assigned(SDL_PumpEvents) Then result := false;
914916
SDL_PollEvent := TSDL_PollEvent_func(GetProcAddress(LibHandle, 'SDL_PollEvent'));
915917
If Not assigned(SDL_PollEvent) Then result := false;
916918
SDL_EventState := TSDL_EventState_func(GetProcAddress(LibHandle, 'SDL_EventState'));

units/sdlevents.inc

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -678,7 +678,9 @@ type
678678
* This should only be run in the thread that sets the video mode.
679679
*}
680680
{$ifdef SDL_RUNTIME_LOADING}
681-
// TODO: Portieren
681+
Type
682+
TSDL_PumpEvents_proc = Procedure (); cdecl;
683+
var SDL_PumpEvents: TSDL_PumpEvents_proc = Nil;
682684
{$else}
683685

684686
procedure SDL_PumpEvents cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PumpEvents' {$ENDIF} {$ENDIF};
@@ -741,16 +743,15 @@ type
741743
* stored in that area.
742744
*}
743745
{$endif}
744-
{$ifdef SDL_RUNTIME_LOADING}
745-
Type
746-
TSDL_PollEvent_func = function (event: PSDL_Event): cint32 cdecl;
747-
Var
748-
SDL_PollEvent : TSDL_PollEvent_func = Nil;
749-
{$else}
750-
751-
function SDL_PollEvent(event: PSDL_Event): cint32 cdecl; external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PollEvent' {$ENDIF} {$ENDIF};
752-
753-
{$endif}
746+
{$ifdef SDL_RUNTIME_LOADING}
747+
Type
748+
TSDL_PollEvent_func = function (event: PSDL_Event): cint32 cdecl;
749+
Var
750+
SDL_PollEvent : TSDL_PollEvent_func = Nil;
751+
{$else}
752+
function SDL_PollEvent(event: PSDL_Event): cint32 cdecl;
753+
external SDL_LibName {$IFDEF DELPHI} {$IFDEF MACOS} name '_SDL_PollEvent' {$ENDIF} {$ENDIF};
754+
{$endif}
754755

755756
{$ifdef SDL_RUNTIME_LOADING}
756757
// TODO: Portieren

0 commit comments

Comments
 (0)