Skip to content

Commit 6b62e57

Browse files
authored
Merge pull request #119 from yglukhov/some-fixes
Added missing WindowEvents, enable iphone api when defined(ios)
2 parents 1018149 + c75b0c8 commit 6b62e57

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/sdl2.nim

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ type
3232
WindowEvent_None = 0, WindowEvent_Shown, WindowEvent_Hidden, WindowEvent_Exposed,
3333
WindowEvent_Moved, WindowEvent_Resized, WindowEvent_SizeChanged, WindowEvent_Minimized,
3434
WindowEvent_Maximized, WindowEvent_Restored, WindowEvent_Enter, WindowEvent_Leave,
35-
WindowEvent_FocusGained, WindowEvent_FocusLost, WindowEvent_Close
35+
WindowEvent_FocusGained, WindowEvent_FocusLost, WindowEvent_Close,
36+
WindowEvent_TakeFocus, WindowEvent_HitTest
3637

3738
EventType* {.size: sizeof(uint32).} = enum
3839
QuitEvent = 0x100, AppTerminating, AppLowMemory, AppWillEnterBackground,
@@ -1687,7 +1688,7 @@ when defined(windows):
16871688
## These can be passed to EnumAdapters and EnumOutputs respectively to get the objects
16881689
## required to create a DX10 or DX11 device and swap chain.
16891690

1690-
elif defined(iPhone):
1691+
elif defined(iPhone) or defined(ios):
16911692

16921693

16931694
#extern DECLSPEC int SDLCALL SDL_iPhoneSetAnimationCallback(

0 commit comments

Comments
 (0)