From 18b118dbbcbf1acfca481e5badb86bc43eeda36a Mon Sep 17 00:00:00 2001 From: Lily Date: Sun, 15 Sep 2024 20:48:46 +0300 Subject: [PATCH] fix buttonB spam --- source/options/NotesSubState.hx | 1 + source/options/OptionsState.hx | 8 ++++---- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/source/options/NotesSubState.hx b/source/options/NotesSubState.hx index 06d2d421690..0da15c2dcae 100644 --- a/source/options/NotesSubState.hx +++ b/source/options/NotesSubState.hx @@ -205,6 +205,7 @@ class NotesSubState extends MusicBeatSubstate FlxG.mouse.visible = false; FlxG.sound.play(Paths.sound('cancelMenu')); close(); + removeVirtualPad(); return; } diff --git a/source/options/OptionsState.hx b/source/options/OptionsState.hx index 946bbf9e6da..aff50373f17 100644 --- a/source/options/OptionsState.hx +++ b/source/options/OptionsState.hx @@ -147,13 +147,13 @@ class OptionsState extends MusicBeatState override function closeSubState() { super.closeSubState(); - removeVirtualPad(); - persistentUpdate = true; - addVirtualPad(LEFT_FULL, ClientPrefs.mobileCPlayStateVpad ? A_B_C : A_B); - virtualPad.camera = otherCamera; if (FlxG.sound.music != null && FlxG.sound.music.volume == 0) FlxTween.tween(FlxG.sound.music, {pitch: 1, volume: 1}, 2.5, {ease: FlxEase.cubeOut}); ClientPrefs.saveSettings(); + removeVirtualPad(); + addVirtualPad(LEFT_FULL, ClientPrefs.mobileCPlayStateVpad ? A_B_C : A_B); + virtualPad.camera = otherCamera; + persistentUpdate = true; } override function update(elapsed:Float) {