mirror of
https://github.com/ClassiCube/ClassiCube.git
synced 2025-09-12 00:56:40 -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();
|
||||
|
||||
Program_Run(0, NULL);
|
||||
Window_ExitFullscreen();
|
||||
Window_ExitFullscreen(); /* TODO remove */
|
||||
Window_RemakeSurface();
|
||||
Launcher_Run();
|
||||
}
|
||||
|
@ -27,10 +27,16 @@ static UIWindow* winHandle;
|
||||
|
||||
@implementation AppDelegate
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
// Override point for customization after application launch.
|
||||
- (void)runMainLoop {
|
||||
extern int main_real(int argc, char** argv);
|
||||
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;
|
||||
}
|
||||
|
||||
@ -107,7 +113,7 @@ void Window_Create(int width, int height) {
|
||||
controller = [ViewController alloc];
|
||||
winHandle = [[UIWindow alloc] initWithFrame:UIScreen.mainScreen.bounds];
|
||||
winHandle.rootViewController = controller;
|
||||
winHandle.backgroundColor = UIColor.greenColor;
|
||||
winHandle.backgroundColor = UIColor.blueColor;
|
||||
WindowInfo.Exists = true;
|
||||
}
|
||||
void Window_SetSize(int width, int height) { }
|
||||
@ -118,7 +124,13 @@ void Window_Show(void) {
|
||||
[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 Window_OpenKeyboard(const struct OpenKeyboardArgs* args) { }
|
||||
|
Loading…
x
Reference in New Issue
Block a user