From c0404d5980febdd6df796034efdd1bf99638e197 Mon Sep 17 00:00:00 2001 From: Louis Moureaux Date: Mon, 13 Sep 2021 00:39:15 +0200 Subject: [PATCH] Disable menu music when autoconnecting People using -a probably want to get to the game faster and won't spend ages in the menus. Disable the menu music in that case. Keep it when disconnecting from a game. Closes #626. --- client/client_main.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/client/client_main.cpp b/client/client_main.cpp index 4e8032289b..ba2449bd10 100644 --- a/client/client_main.cpp +++ b/client/client_main.cpp @@ -606,7 +606,11 @@ int client_main(int argc, char *argv[]) } audio_real_init(sound_set_name, music_set_name, sound_plugin_name); - start_menu_music(QStringLiteral("music_menu"), NULL); + if (!auto_connect) { + // People autoconnecting won't stay in the menus for long. Avoid starting + // music that will be stopped immediately. + start_menu_music(QStringLiteral("music_menu"), NULL); + } editor_init();