Commits

Leonard Ritter  committed 641746c

support for SDL_GetDisplayBounds

  • Participants
  • Parent commits d957a24

Comments (0)

Files changed (3)

File sdl/__init__.py

     if result == 0:
         return mode
 
+def SDL_GetDisplayBounds(displayIndex):
+    rect = _ffi.new('SDL_Rect *')
+    result = _SDL_GetDisplayBounds(displayIndex, rect)
+    if result == 0:
+        return (rect.x, rect.y, rect.w, rect.h)
+
 def SDL_GL_GetAttribute(attr):
     value = _ffi.new('int *')
     _SDL_GL_GetAttribute(attr, value)
 "_SDL_GetClipboardText",
 "_SDL_GetDesktopDisplayMode",
 "_SDL_GL_GetAttribute",
+"_SDL_GetDisplayBounds",
 "_SDL_JoystickName",
 "_SDL_Init",
 "_SDL_PollEvent",
 "SDL_WINDOW_OPENGL",
 "SDL_DOLLARGESTURE",
 "SDL_NUM_SCANCODES",
-"SDL_GetDisplayBounds",
 "SDL_SCANCODE_DOWN",
 "SDL_SCANCODE_LANG7",
 "SDL_TEXTEDITINGEVENT_TEXT_SIZE",
 SDL_WINDOW_OPENGL = 2
 SDL_DOLLARGESTURE = 2048
 SDL_NUM_SCANCODES = 512
-SDL_GetDisplayBounds = guard(lookup('SDL_GetDisplayBounds'))
+_SDL_GetDisplayBounds = guard(lookup('SDL_GetDisplayBounds'))
 SDL_SCANCODE_DOWN = 81
 SDL_SCANCODE_LANG7 = 150
 SDL_TEXTEDITINGEVENT_TEXT_SIZE = 32

File sdl/builder.py

         'SDL_GL_GetAttribute',
         'SDL_GetClipboardText',
         'SDL_JoystickName',
+        'SDL_GetDisplayBounds',
     ],
     AUTOCHECK_BLACKLIST = [
         'SDL_GetError',