This commit is contained in:
Yoshman29
2022-12-08 16:42:56 +01:00
parent 65dc05d3c3
commit a4d07ae8ab
3 changed files with 22 additions and 10 deletions
+1 -1
View File
@@ -1 +1 @@
1431
1437
+11 -9
View File
@@ -608,6 +608,8 @@ class PlayState extends MusicBeatState
inst = FlxG.sound.load(Paths.inst(PlayState.SONG.song));
vocals = FlxG.sound.list.recycle(FlxSound);
@:privateAccess
vocals.reset();
if (SONG.needsVoices)
vocals.loadEmbedded(Paths.voices(PlayState.SONG.song));
FlxG.sound.list.add(vocals);
@@ -790,10 +792,10 @@ class PlayState extends MusicBeatState
}
}
#end
if (__wasAutoPause && __songPlaying) {
inst.play();
vocals.play();
}
// if (__wasAutoPause && __songPlaying) {
// inst.play();
// vocals.play();
// }
super.onFocus();
}
@@ -807,11 +809,11 @@ class PlayState extends MusicBeatState
DiscordClient.changePresence(detailsPausedText, SONG.song + " (" + difficultyText + ")", iconRPC);
}
#end
if (__wasAutoPause = FlxG.autoPause) {
__songPlaying = inst.playing;
inst.pause();
vocals.pause();
}
// if (__wasAutoPause = FlxG.autoPause) {
// __songPlaying = inst.playing;
// inst.pause();
// vocals.pause();
// }
super.onFocusLost();
+10
View File
@@ -113,7 +113,17 @@ class Main extends Sprite
public static var audioDisconnected:Bool = false;
public static var changeID:Int = 0;
private static var __threadCycle:Int = 0;
public static function execAsync(func:Void->Void) {
#if sys
var thread = gameThreads[(__threadCycle++) % gameThreads.length];
thread.events.run(func);
#else
func();
#end
}
public function loadGameSettings() {
#if sys