| | |
| | | |
| | | /* DUMMY driver bootstrap functions */ |
| | | |
| | | static int |
| | | UIKit_Available(void) |
| | | { |
| | | return 1; |
| | | } |
| | | |
| | | static void UIKit_DeleteDevice(SDL_VideoDevice * device) |
| | | { |
| | | @autoreleasepool { |
| | |
| | | device->DestroyWindow = UIKit_DestroyWindow; |
| | | device->GetWindowWMInfo = UIKit_GetWindowWMInfo; |
| | | device->GetDisplayUsableBounds = UIKit_GetDisplayUsableBounds; |
| | | device->GetDisplayDPI = UIKit_GetDisplayDPI; |
| | | |
| | | #if SDL_IPHONE_KEYBOARD |
| | | device->HasScreenKeyboardSupport = UIKit_HasScreenKeyboardSupport; |
| | |
| | | #if SDL_VIDEO_METAL |
| | | device->Metal_CreateView = UIKit_Metal_CreateView; |
| | | device->Metal_DestroyView = UIKit_Metal_DestroyView; |
| | | device->Metal_GetLayer = UIKit_Metal_GetLayer; |
| | | device->Metal_GetDrawableSize = UIKit_Metal_GetDrawableSize; |
| | | #endif |
| | | |
| | | device->gl_config.accelerated = 1; |
| | |
| | | |
| | | VideoBootStrap UIKIT_bootstrap = { |
| | | UIKITVID_DRIVER_NAME, "SDL UIKit video driver", |
| | | UIKit_Available, UIKit_CreateDevice |
| | | UIKit_CreateDevice |
| | | }; |
| | | |
| | | |
| | |
| | | if (UIKit_InitModes(_this) < 0) { |
| | | return -1; |
| | | } |
| | | |
| | | SDL_InitGCKeyboard(); |
| | | SDL_InitGCMouse(); |
| | | |
| | | return 0; |
| | | } |
| | | |
| | | void |
| | | UIKit_VideoQuit(_THIS) |
| | | { |
| | | SDL_QuitGCKeyboard(); |
| | | SDL_QuitGCMouse(); |
| | | |
| | | UIKit_QuitModes(_this); |
| | | } |
| | | |