mirror of
https://github.com/zydeco/minivmac4ios.git
synced 2024-11-25 07:32:30 +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 {
|
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
|
||||||
sharedAppDelegate = self;
|
sharedAppDelegate = self;
|
||||||
[self performSelector:@selector(runEmulator) withObject:nil afterDelay:1.0];
|
[self performSelector:@selector(runEmulator) withObject:nil afterDelay:0.1];
|
||||||
return YES;
|
return YES;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1677,9 +1677,10 @@ GLOBALFUNC blnr ExtraTimeNotOver(void) {
|
|||||||
|
|
||||||
GLOBALPROC WaitForNextTick(void) {
|
GLOBALPROC WaitForNextTick(void) {
|
||||||
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
|
||||||
NSDate *nextTickDate = [NSDate dateWithTimeIntervalSinceNow:1 / 60.0];
|
NSRunLoop *mainRunLoop = [NSRunLoop mainRunLoop];
|
||||||
label_retry:
|
while (ExtraTimeNotOver()) {
|
||||||
[[NSRunLoop mainRunLoop] runUntilDate:nextTickDate];
|
[mainRunLoop runMode:NSDefaultRunLoopMode beforeDate:[NSDate dateWithTimeIntervalSinceReferenceDate:NextTickChangeTime]];
|
||||||
|
}
|
||||||
|
|
||||||
CheckForSavedTasks();
|
CheckForSavedTasks();
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user