mirror of
https://github.com/SK-la/osu-framework.git
synced 2026-03-15 03:20:30 +00:00
Use SDL3 screen saver functions to implement AllowScreenSuspension
This removes the custom Android and iOS implementations, and also adds support for desktop platforms.
This commit is contained in:
@@ -30,15 +30,6 @@ namespace osu.Framework.iOS
|
||||
|
||||
protected override IWindow CreateWindow(GraphicsSurfaceType preferredSurface) => new IOSWindow(preferredSurface, Options.FriendlyGameName);
|
||||
|
||||
protected override void SetupForRun()
|
||||
{
|
||||
base.SetupForRun();
|
||||
|
||||
AllowScreenSuspension.Result.BindValueChanged(allow =>
|
||||
InputThread.Scheduler.Add(() => UIApplication.SharedApplication.IdleTimerDisabled = !allow.NewValue),
|
||||
true);
|
||||
}
|
||||
|
||||
protected override void SetupConfig(IDictionary<FrameworkSetting, object> defaultOverrides)
|
||||
{
|
||||
if (!defaultOverrides.ContainsKey(FrameworkSetting.ExecutionMode))
|
||||
|
||||
Reference in New Issue
Block a user