From cc5558c759ea777068a4cdb7ecee3c2ea213ade9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=8D=9A=7ENex?= <87421482+NexIsDumb@users.noreply.github.com> Date: Mon, 17 Jul 2023 19:15:40 +0200 Subject: [PATCH] Time left on Discord RPC bug fix (#187) * le fix * i forgor --- source/funkin/game/PlayState.hx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source/funkin/game/PlayState.hx b/source/funkin/game/PlayState.hx index 3762e077..cf4a5c20 100644 --- a/source/funkin/game/PlayState.hx +++ b/source/funkin/game/PlayState.hx @@ -1015,13 +1015,22 @@ class PlayState extends MusicBeatState @:dox(hide) override public function onFocus():Void { + if (!paused && FlxG.autoPause) { + inst.resume(); + vocals.resume(); + } scripts.call("onFocus"); + updateDiscordPresence(); super.onFocus(); } @:dox(hide) override public function onFocusLost():Void { + if (!paused && FlxG.autoPause) { + inst.pause(); + vocals.pause(); + } scripts.call("onFocusLost"); updateDiscordPresence(); super.onFocusLost();