From 9694defa8d0710013e86cb113cfee99bd9578f51 Mon Sep 17 00:00:00 2001 From: Cameron Taylor Date: Sat, 28 Aug 2021 18:10:32 -0400 Subject: [PATCH] volume save data finally fixed lol --- source/TitleState.hx | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/source/TitleState.hx b/source/TitleState.hx index 606ed3304..1dbbed244 100644 --- a/source/TitleState.hx +++ b/source/TitleState.hx @@ -109,6 +109,23 @@ class TitleState extends MusicBeatState super.create(); FlxG.save.bind('funkin', 'ninjamuffin99'); + + // https://github.com/HaxeFlixel/flixel/pull/2396 + // IF/WHEN MY PR GOES THRU AND IT GETS INTO MAIN FLIXEL, DELETE THIS CHUNKOF CODE, AND THEN UNCOMMENT THE LINE BELOW + // FlxG.sound.loadSavedPrefs(); + + if (FlxG.save.data.volume != null) + { + FlxG.sound.volume = FlxG.save.data.volume; + } + + if (FlxG.save.data.mute != null) + { + FlxG.sound.muted = FlxG.save.data.mute; + } + + // FlxG.save.close(); + // FlxG.sound.loadSavedPrefs(); PreferencesMenu.initPrefs(); PlayerSettings.init(); Highscore.load();