mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2025-01-07 18:39:37 +01:00
9ac3bb7011
You should call SDL_SetMainReady(), and then customize the QIOSApplicationDelegate like this, in your application code: /* Additional support for applications mixing Qt and SDL */ @interface QIOSApplicationDelegate : UIResponder <UIApplicationDelegate> @end extern "C" { void SDL_OnApplicationWillResignActive(); void SDL_OnApplicationDidEnterBackground(); void SDL_OnApplicationWillEnterForeground(); void SDL_OnApplicationDidBecomeActive(); } @interface QIOSApplicationDelegate (SDL) - (void)applicationWillResignActive:(UIApplication*)application; - (void)applicationDidEnterBackground:(UIApplication*)application; - (void)applicationWillEnterForeground:(UIApplication*)application; - (void)applicationDidBecomeActive:(UIApplication*)application; @end @implementation QIOSApplicationDelegate (SDL) - (void)applicationWillResignActive:(UIApplication*)application { SDL_OnApplicationWillResignActive(); } - (void)applicationDidEnterBackground:(UIApplication*)application { SDL_OnApplicationDidEnterBackground(); } - (void)applicationWillEnterForeground:(UIApplication*)application { SDL_OnApplicationWillEnterForeground(); } - (void)applicationDidBecomeActive:(UIApplication*)application { SDL_OnApplicationDidBecomeActive(); } @end // QIOSApplicationDelegate |
||
---|---|---|
.. | ||
keyinfotable.h | ||
SDL_uikitappdelegate.h | ||
SDL_uikitappdelegate.m | ||
SDL_uikitclipboard.h | ||
SDL_uikitclipboard.m | ||
SDL_uikitevents.h | ||
SDL_uikitevents.m | ||
SDL_uikitmessagebox.h | ||
SDL_uikitmessagebox.m | ||
SDL_uikitmodes.h | ||
SDL_uikitmodes.m | ||
SDL_uikitopengles.h | ||
SDL_uikitopengles.m | ||
SDL_uikitopenglview.h | ||
SDL_uikitopenglview.m | ||
SDL_uikitvideo.h | ||
SDL_uikitvideo.m | ||
SDL_uikitview.h | ||
SDL_uikitview.m | ||
SDL_uikitviewcontroller.h | ||
SDL_uikitviewcontroller.m | ||
SDL_uikitwindow.h | ||
SDL_uikitwindow.m |