mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 18:06:26 +00:00
Merge pull request #853 from criezy/ios-no-sleep
IOS: Disable idle timer while an engine is running
This commit is contained in:
commit
6da591df88
@ -123,6 +123,9 @@ public:
|
|||||||
static OSystem_iOS7 *sharedInstance();
|
static OSystem_iOS7 *sharedInstance();
|
||||||
|
|
||||||
virtual void initBackend();
|
virtual void initBackend();
|
||||||
|
|
||||||
|
virtual void engineInit();
|
||||||
|
virtual void engineDone();
|
||||||
|
|
||||||
virtual bool hasFeature(Feature f);
|
virtual bool hasFeature(Feature f);
|
||||||
virtual void setFeatureState(Feature f, bool enable);
|
virtual void setFeatureState(Feature f, bool enable);
|
||||||
|
@ -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() {
|
void OSystem_iOS7::initVideoContext() {
|
||||||
_videoContext = [[iOS7AppDelegate iPhoneView] getVideoContext];
|
_videoContext = [[iOS7AppDelegate iPhoneView] getVideoContext];
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user