mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-11-22 03:30:59 +00:00
more accurate emulation timing
This commit is contained in:
parent
9b4aa7a9e7
commit
5cad8eef18
@ -32,7 +32,7 @@ static AppDelegate *sharedAppDelegate = nil;
|
||||
|
||||
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||
sharedAppDelegate = self;
|
||||
[self performSelector:@selector(runEmulator) withObject:nil afterDelay:1.0];
|
||||
[self performSelector:@selector(runEmulator) withObject:nil afterDelay:0.1];
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -1677,9 +1677,10 @@ GLOBALFUNC blnr ExtraTimeNotOver(void) {
|
||||
|
||||
GLOBALPROC WaitForNextTick(void) {
|
||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||
NSDate *nextTickDate = [NSDate dateWithTimeIntervalSinceNow:1 / 60.0];
|
||||
label_retry:
|
||||
[[NSRunLoop mainRunLoop] runUntilDate:nextTickDate];
|
||||
NSRunLoop *mainRunLoop = [NSRunLoop mainRunLoop];
|
||||
while (ExtraTimeNotOver()) {
|
||||
[mainRunLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceReferenceDate:NextTickChangeTime]];
|
||||
}
|
||||
|
||||
CheckForSavedTasks();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user