aboutsummaryrefslogtreecommitdiff
path: root/views/script/game_music.js
diff options
context:
space:
mode:
Diffstat (limited to 'views/script/game_music.js')
-rw-r--r--views/script/game_music.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/views/script/game_music.js b/views/script/game_music.js
index 2aa7e94..7d43a25 100644
--- a/views/script/game_music.js
+++ b/views/script/game_music.js
@@ -1,8 +1,8 @@
startHooks.push(() => {
info("MusicMgr", "Playing game" + i + ".mp3");
- require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file);
+ if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['game' + i].file);
})
if (location.search === "?online") {
- require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file);
-} \ No newline at end of file
+ if (require('@electron/remote').getCurrentWindow().music) require('electron').ipcRenderer.send('newmusic', kresources.music['prepare'].file);
+}