diff options
author | Thierry Crozat | 2016-10-20 22:38:14 +0100 |
---|---|---|
committer | Thierry Crozat | 2016-10-20 22:38:14 +0100 |
commit | 4a9446490af0b8018b4999c8fa11a6d5ec4ea980 (patch) | |
tree | 453bbb48fcd634e9081306153bd6324fe874b708 /backends/platform/ios7/ios7_osys_video.mm | |
parent | 6c13a4d0001a91e352dc99d768f528ac9fe7bd3e (diff) | |
download | scummvm-rg350-4a9446490af0b8018b4999c8fa11a6d5ec4ea980.tar.gz scummvm-rg350-4a9446490af0b8018b4999c8fa11a6d5ec4ea980.tar.bz2 scummvm-rg350-4a9446490af0b8018b4999c8fa11a6d5ec4ea980.zip |
IOS: Disable idle timer while an engine is running
Diffstat (limited to 'backends/platform/ios7/ios7_osys_video.mm')
-rw-r--r-- | backends/platform/ios7/ios7_osys_video.mm | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm index 6784cf46f5..5370ef02dd 100644 --- a/backends/platform/ios7/ios7_osys_video.mm +++ b/backends/platform/ios7/ios7_osys_video.mm @@ -61,6 +61,18 @@ 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]; +} + +void OSystem_iOS7::engineDone() { + EventsBaseBackend::engineDone(); + // Allow the device going to sleep if idle while in the Launcher + [[UIApplication sharedApplication] setIdleTimerDisabled:NO]; +} + void OSystem_iOS7::initVideoContext() { _videoContext = [[iOS7AppDelegate iPhoneView] getVideoContext]; } |