mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-07-11 01:25:07 +02:00
iOS: Fix threading issue with launch-url
This commit is contained in:
@@ -197,7 +197,7 @@ extern float g_safeInsetBottom;
|
||||
view.drawableDepthFormat = GLKViewDrawableDepthFormat24;
|
||||
view.drawableStencilFormat = GLKViewDrawableStencilFormat8;
|
||||
[EAGLContext setCurrentContext:self.context];
|
||||
self.preferredFramesPerSecond = 60;
|
||||
self.preferredFramesPerSecond = 60; // NOTE: We don't yet take advantage of 120hz screens
|
||||
|
||||
[[DisplayManager shared] updateResolution:[UIScreen mainScreen]];
|
||||
|
||||
@@ -239,7 +239,6 @@ extern float g_safeInsetBottom;
|
||||
NativeFrame(graphicsContext);
|
||||
}
|
||||
|
||||
|
||||
INFO_LOG(SYSTEM, "Emulation thread shutting down\n");
|
||||
NativeShutdownGraphics();
|
||||
|
||||
@@ -752,7 +751,10 @@ void stopLocation() {
|
||||
|
||||
void System_LaunchUrl(LaunchUrlType urlType, char const* url)
|
||||
{
|
||||
[[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithCString:url encoding:NSStringEncodingConversionAllowLossy]]];
|
||||
NSURL *nsUrl = [NSURL URLWithString:[NSString stringWithCString:url encoding:NSStringEncodingConversionAllowLossy]];
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
[[UIApplication sharedApplication] openURL:nsUrl] options:@{} completionHandler:nil];
|
||||
});
|
||||
}
|
||||
|
||||
void bindDefaultFBO()
|
||||
|
||||
+10
@@ -437,6 +437,16 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
|
||||
[sharedViewController shareText:text];
|
||||
return true;
|
||||
}
|
||||
/*
|
||||
// Not 100% sure the threading is right
|
||||
case SystemRequestType::COPY_TO_CLIPBOARD:
|
||||
{
|
||||
@autoreleasepool {
|
||||
[UIPasteboard generalPasteboard].string = @(param1.c_str());
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
*/
|
||||
case SystemRequestType::SET_KEEP_SCREEN_BRIGHT:
|
||||
dispatch_async(dispatch_get_main_queue(), ^{
|
||||
INFO_LOG(SYSTEM, "SET_KEEP_SCREEN_BRIGHT: %d", (int)param3);
|
||||
|
||||
Reference in New Issue
Block a user