diff options
Diffstat (limited to 'backends/platform/ios7/ios7_osys_video.mm')
| -rw-r--r-- | backends/platform/ios7/ios7_osys_video.mm | 13 | 
1 files changed, 12 insertions, 1 deletions
| diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm index 6784cf46f5..1ec0defd7e 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];  } @@ -76,7 +88,6 @@ int OSystem_iOS7::getDefaultGraphicsMode() const {  bool OSystem_iOS7::setGraphicsMode(int mode) {  	switch (mode) {  	case kGraphicsModeNone: -	case kGraphicsModeLinear:  	case kGraphicsMode2xSaI:  	case kGraphicsModeSuper2xSaI:  	case kGraphicsModeSuperEagle: | 
