iOS: Switch to the same screen dimming logic as Windows/Android

This commit is contained in:
Henrik Rydgård committed 2024-05-20 14:27:42 +02:00
1 parent 5042555d7b
commit d720224c87
2 files changed
+6 -4

No files matched your search

-4
View File
@@ -559,8 +559,6 @@ int ToTouchID(UITouch *uiTouch, bool allowAllocate) {
if ([[GCController controllers] count] > 0) {
[self setupController:[[GCController controllers] firstObject]];
} else {
[[UIApplication sharedApplication] setIdleTimerDisabled:NO];
}
}
}
@@ -590,8 +588,6 @@ int ToTouchID(UITouch *uiTouch, bool allowAllocate) {
return;
}
[[UIApplication sharedApplication] setIdleTimerDisabled:YES]; // prevent auto-lock
self.gameController.controllerPausedHandler = ^(GCController *controller) {
KeyInput key;
key.flags = KEY_DOWN;
+6
View File
@@ -437,6 +437,12 @@ bool System_MakeRequest(SystemRequestType type, int requestId, const std::string
[sharedViewController shareText:text];
return true;
}
case SystemRequestType::SET_KEEP_SCREEN_BRIGHT:
dispatch_async(dispatch_get_main_queue(), ^{
INFO_LOG(SYSTEM, "SET_KEEP_SCREEN_BRIGHT: %d", (int)param3);
[[UIApplication sharedApplication] setIdleTimerDisabled: (param3 ? YES : NO)];
});
return true;
default:
return false;
}