diff --git a/source/funkin/play/PlayState.hx b/source/funkin/play/PlayState.hx index 890f4bc0c..5394669d7 100644 --- a/source/funkin/play/PlayState.hx +++ b/source/funkin/play/PlayState.hx @@ -1537,14 +1537,13 @@ class PlayState extends MusicBeatSubState */ public override function onFocus():Void { - if (VideoCutscene.isPlaying() && FlxG.autoPause && isGamePaused) VideoCutscene.pauseVideo(); + if (VideoCutscene.isPlaying() && Preferences.autoPause && isGamePaused) VideoCutscene.pauseVideo(); #if html5 - else - VideoCutscene.resumeVideo(); + else if (Preferences.autoPause) VideoCutscene.resumeVideo(); #end #if FEATURE_DISCORD_RPC - if (health > Constants.HEALTH_MIN && !isGamePaused && FlxG.autoPause) + if (health > Constants.HEALTH_MIN && !isGamePaused && Preferences.autoPause) { if (Conductor.instance.songPosition > 0.0) { @@ -1582,11 +1581,11 @@ class PlayState extends MusicBeatSubState public override function onFocusLost():Void { #if html5 - if (FlxG.autoPause) VideoCutscene.pauseVideo(); + if (Preferences.autoPause) VideoCutscene.pauseVideo(); #end #if FEATURE_DISCORD_RPC - if (health > Constants.HEALTH_MIN && !isGamePaused && FlxG.autoPause) + if (health > Constants.HEALTH_MIN && !isGamePaused && Preferences.autoPause) { DiscordClient.instance.setPresence( { @@ -1722,6 +1721,10 @@ class PlayState extends MusicBeatSubState funkin.util.plugins.TouchPointerPlugin.enabled = true; #end + #if !mobile + FlxG.autoPause = Preferences.autoPause; + #end + super.destroy(); }