mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-29 20:27:12 +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 |
||
---|---|---|
.. | ||
android | ||
cocoa | ||
directfb | ||
dummy | ||
emscripten | ||
haiku | ||
mir | ||
nacl | ||
pandora | ||
psp | ||
raspberry | ||
uikit | ||
vivante | ||
wayland | ||
windows | ||
winrt | ||
x11 | ||
SDL_blit_0.c | ||
SDL_blit_1.c | ||
SDL_blit_A.c | ||
SDL_blit_auto.c | ||
SDL_blit_auto.h | ||
SDL_blit_copy.c | ||
SDL_blit_copy.h | ||
SDL_blit_N.c | ||
SDL_blit_slow.c | ||
SDL_blit_slow.h | ||
SDL_blit.c | ||
SDL_blit.h | ||
SDL_bmp.c | ||
SDL_clipboard.c | ||
SDL_egl_c.h | ||
SDL_egl.c | ||
SDL_fillrect.c | ||
SDL_pixels_c.h | ||
SDL_pixels.c | ||
SDL_rect_c.h | ||
SDL_rect.c | ||
SDL_RLEaccel_c.h | ||
SDL_RLEaccel.c | ||
SDL_shape_internals.h | ||
SDL_shape.c | ||
SDL_stretch.c | ||
SDL_surface.c | ||
SDL_sysvideo.h | ||
SDL_video.c | ||
sdlgenblit.pl |