mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 09:06:55 -04:00
fix never displaying anything on ios version
This commit is contained in:
parent
564086b7f9
commit
d2f8233e6d
@ -338,7 +338,7 @@ void Launcher_Run(void) {
|
|||||||
Http_Component.Free();
|
Http_Component.Free();
|
||||||
|
|
||||||
Program_Run(0, NULL);
|
Program_Run(0, NULL);
|
||||||
Window_ExitFullscreen();
|
Window_ExitFullscreen(); /* TODO remove */
|
||||||
Window_RemakeSurface();
|
Window_RemakeSurface();
|
||||||
Launcher_Run();
|
Launcher_Run();
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,16 @@ static UIWindow* winHandle;
|
|||||||
|
|
||||||
@implementation AppDelegate
|
@implementation AppDelegate
|
||||||
|
|
||||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
- (void)runMainLoop {
|
||||||
// Override point for customization after application launch.
|
|
||||||
extern int main_real(int argc, char** argv);
|
extern int main_real(int argc, char** argv);
|
||||||
main_real(1, NULL);
|
main_real(1, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
|
// Override point for customization after application launch.
|
||||||
|
// schedule the actual main loop to run in next CFRunLoop iteration
|
||||||
|
// (as calling main_real here doesn't work properly)
|
||||||
|
[self performSelector:@selector(runMainLoop) withObject:nil afterDelay:0.0];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -107,7 +113,7 @@ void Window_Create(int width, int height) {
|
|||||||
controller = [ViewController alloc];
|
controller = [ViewController alloc];
|
||||||
winHandle = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
winHandle = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||||
winHandle.rootViewController = controller;
|
winHandle.rootViewController = controller;
|
||||||
winHandle.backgroundColor = UIColor.greenColor;
|
winHandle.backgroundColor = UIColor.blueColor;
|
||||||
WindowInfo.Exists = true;
|
WindowInfo.Exists = true;
|
||||||
}
|
}
|
||||||
void Window_SetSize(int width, int height) { }
|
void Window_SetSize(int width, int height) { }
|
||||||
@ -118,7 +124,13 @@ void Window_Show(void) {
|
|||||||
[winHandle makeKeyAndVisible];
|
[winHandle makeKeyAndVisible];
|
||||||
}
|
}
|
||||||
|
|
||||||
void Window_ProcessEvents(void) { }
|
void Window_ProcessEvents(void) {
|
||||||
|
SInt32 res;
|
||||||
|
// manually tick event queue
|
||||||
|
do {
|
||||||
|
res = CFRunLoopRunInMode(kCFRunLoopDefaultMode, 0, TRUE);
|
||||||
|
} while (res == kCFRunLoopRunHandledSource);
|
||||||
|
}
|
||||||
void ShowDialogCore(const char* title, const char* msg) { }
|
void ShowDialogCore(const char* title, const char* msg) { }
|
||||||
|
|
||||||
void Window_OpenKeyboard(const struct OpenKeyboardArgs* args) { }
|
void Window_OpenKeyboard(const struct OpenKeyboardArgs* args) { }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user