Merge pull request #9563 from yoshisuga/fix-main-thread-call

iOS: #9562: wrap call to get app delegate around a gcd main thread async call
This commit is contained in:
Twinaphex 2019-10-07 02:05:01 +02:00 committed by GitHub
commit 875ff0e28c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -168,7 +168,9 @@ void *glkitview_init(void);
#elif TARGET_OS_IOS
-(void) showNativeMenu {
[[RetroArch_iOS get] toggleUI];
dispatch_async(dispatch_get_main_queue(), ^{
[[RetroArch_iOS get] toggleUI];
});
}
- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures

View File

@ -717,9 +717,11 @@ didSelectRowAtIndexPath:(NSIndexPath *)indexPath
target:weakSelf
action:@selector(menuBack)];
[self set_rightbutton:BOXSTRING("Switch")
target:[RetroArch_iOS get]
action:@selector(showGameView)];
dispatch_async(dispatch_get_main_queue(), ^{
[self set_rightbutton:BOXSTRING("Switch")
target:[RetroArch_iOS get]
action:@selector(showGameView)];
});
}
- (void) set_leftbutton:(NSString *)title target:(id)target action:(SEL)action