[Scummvm-git-logs] scummvm master -> 58f3aac49ece050ddd3f5a51b4033a1bcadc08a7
digitall
dgturner at iee.org
Fri Sep 14 03:25:57 CEST 2018
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
58f3aac49e IOS: Only change idle timer from main thread.
Commit: 58f3aac49ece050ddd3f5a51b4033a1bcadc08a7
https://github.com/scummvm/scummvm/commit/58f3aac49ece050ddd3f5a51b4033a1bcadc08a7
Author: Jonny Bergström (jonnybergstrom at gmail.com)
Date: 2018-09-14T02:32:25+01:00
Commit Message:
IOS: Only change idle timer from main thread.
This prevents various runtime warnings i.e.
"Main Thread Checker: UI API called on a background thread:
-[UIApplication setIdleTimerDisabled:] ..."
Changed paths:
backends/platform/ios7/ios7_osys_video.mm
diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm
index 730715d..3196f88 100644
--- a/backends/platform/ios7/ios7_osys_video.mm
+++ b/backends/platform/ios7/ios7_osys_video.mm
@@ -64,13 +64,17 @@ void OSystem_iOS7::fatalError() {
void OSystem_iOS7::engineInit() {
EventsBaseBackend::engineInit();
// Prevent the device going to sleep during game play (and in particular cut scenes)
- [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [[UIApplication sharedApplication] setIdleTimerDisabled:YES];
+ });
}
void OSystem_iOS7::engineDone() {
EventsBaseBackend::engineDone();
// Allow the device going to sleep if idle while in the Launcher
- [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
+ dispatch_async(dispatch_get_main_queue(), ^{
+ [[UIApplication sharedApplication] setIdleTimerDisabled:NO];
+ });
}
void OSystem_iOS7::initVideoContext() {
More information about the Scummvm-git-logs
mailing list