fix uge playback breaking when loosing focus, fix preview corruption
This does mean that previewing a song in events is harder to stop, must stop with the pause button.
@@ -25,7 +25,7 @@ export function initMusic() {
// Initialise audio on first click
window.addEventListener("click", initMusic);
window.addEventListener("keydown", initMusic);
-window.addEventListener("blur", pause);
+//window.addEventListener("blur", pause);
function onSongLoaded(player: ScripTracker) {
player.play();
@@ -51,7 +51,7 @@ async function playUGE(filename: string, _settings: MusicSettings) {
});
}
};
- ipcRenderer.on("music-data", listener);
+ ipcRenderer.once("music-data", listener);
ipcRenderer.send("open-music");
}
