iOS: #9562: wrap call to get app delegate around a gcd main thread async call

This commit is contained in:
Yoshi Sugawara 2019-10-06 09:41:53 -10:00
parent 0f55f8f12b
commit 2b415292c6
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