pygame / SDL / __init__.py

Diff from to

SDL/__init__.py

         SDL.darwin.init()
     return _SDL_Init(flags)
 
-SDL_InitSubSystem = SDL.dll.function('SDL_InitSubSystem',
+_SDL_InitSubSystem = SDL.dll.private_function('SDL_InitSubSystem',
+    arg_types=[ctypes.c_uint],
+    return_type=ctypes.c_int)
+
+def SDL_InitSubSystem(flags):
     '''Initialize specific SDL subsystems.
 
     :Parameters:
     :rtype: int
     :return: undocumented (FIXME)
     :see: `SDL_Init`, `SDL_QuitSubSystem`
-    ''',
-    args=['flags'],
-    arg_types=[ctypes.c_uint],
-    return_type=ctypes.c_int)
+    '''
+    if sys.platform == 'darwin' and flags & SDL_INIT_VIDEO:
+        import SDL.darwin
+        SDL.darwin.init()
+    return _SDL_InitSubSystem(flags)
 
 SDL_QuitSubSystem = SDL.dll.function('SDL_QuitSubSystem',
     '''Clean up specific SDL subsystems.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.