overlays: add toggle for boot sequence music

This commit is contained in:
Megamouse 2026-03-30 15:57:17 +02:00 committed by Ani
parent cb3a83cba7
commit 7c9261a461
9 changed files with 22 additions and 2 deletions

View file

@ -221,6 +221,7 @@ namespace rsx
home_menu_settings_overlays::home_menu_settings_overlays(s16 x, s16 y, u16 width, u16 height, bool use_separators, home_menu_page* parent)
: home_menu_settings_page(x, y, width, height, use_separators, parent, get_localized_string(localized_string_id::HOME_MENU_SETTINGS_OVERLAYS))
{
add_checkbox(&g_cfg.misc.play_music_during_boot, localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_PLAY_MUSIC_DURING_BOOT);
add_checkbox(&g_cfg.misc.show_trophy_popups, localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_SHOW_TROPHY_POPUPS);
add_checkbox(&g_cfg.misc.show_rpcn_popups, localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_SHOW_RPCN_POPUPS);
add_checkbox(&g_cfg.misc.show_shader_compilation_hint, localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_SHOW_SHADER_COMPILATION_HINT);

View file

@ -712,9 +712,12 @@ namespace rsx
{
m_overlay_manager = g_fxo->init<rsx::overlays::display_manager>(0);
if (const std::string audio_path = Emu.GetSfoDir(true) + "/SND0.AT3"; fs::is_file(audio_path))
if (g_cfg.misc.play_music_during_boot)
{
m_overlay_manager->start_audio(audio_path);
if (const std::string audio_path = Emu.GetSfoDir(true) + "/SND0.AT3"; fs::is_file(audio_path))
{
m_overlay_manager->start_audio(audio_path);
}
}
}

View file

@ -256,6 +256,7 @@ enum class localized_string_id
HOME_MENU_SETTINGS_OVERLAYS_SHOW_MOUSE_AND_KB_TOGGLE_HINT,
HOME_MENU_SETTINGS_OVERLAYS_SHOW_FATAL_ERROR_HINTS,
HOME_MENU_SETTINGS_OVERLAYS_RECORD_WITH_OVERLAYS,
HOME_MENU_SETTINGS_OVERLAYS_PLAY_MUSIC_DURING_BOOT,
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY,
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_ENABLE,
HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_ENABLE_FRAMERATE_GRAPH,

View file

@ -364,6 +364,7 @@ struct cfg_root : cfg::node
cfg::_bool silence_all_logs{ this, "Silence All Logs", false, true };
cfg::string title_format{ this, "Window Title Format", "FPS: %F | %R | %V | %T [%t]", true };
cfg::_bool pause_during_home_menu{this, "Pause Emulation During Home Menu", false, false };
cfg::_bool play_music_during_boot{this, "Play music during boot sequence", true, true };
cfg::_bool enable_gamemode{ this, "Enable GameMode", false, false };
} misc{ this };

View file

@ -193,6 +193,7 @@ enum class emu_settings_type
ShowCaptureHints,
WindowTitleFormat,
PauseDuringHomeMenu,
PlayMusicDuringBoot,
EnableGamemode,
// Network
@ -411,6 +412,7 @@ inline static const std::map<emu_settings_type, cfg_location> settings_location
{ emu_settings_type::SilenceAllLogs, { "Miscellaneous", "Silence All Logs" }},
{ emu_settings_type::WindowTitleFormat, { "Miscellaneous", "Window Title Format" }},
{ emu_settings_type::PauseDuringHomeMenu, { "Miscellaneous", "Pause Emulation During Home Menu" }},
{ emu_settings_type::PlayMusicDuringBoot, { "Miscellaneous", "Play music during boot sequence" }},
{ emu_settings_type::EnableGamemode, { "Miscellaneous", "Enable GameMode" }},
// Networking

View file

@ -276,6 +276,7 @@ private:
case localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_SHOW_MOUSE_AND_KB_TOGGLE_HINT: return tr("Show Mouse And Keyboard Toggle Hint", "Overlays");
case localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_SHOW_FATAL_ERROR_HINTS: return tr("Show Fatal Error Hints", "Overlays");
case localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_RECORD_WITH_OVERLAYS: return tr("Record With Overlays", "Overlays");
case localized_string_id::HOME_MENU_SETTINGS_OVERLAYS_PLAY_MUSIC_DURING_BOOT: return tr("Play music during boot sequence.", "Overlays");
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY: return tr("Performance Overlay");
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_ENABLE: return tr("Enable Performance Overlay", "Performance Overlay");
case localized_string_id::HOME_MENU_SETTINGS_PERFORMANCE_OVERLAY_ENABLE_FRAMERATE_GRAPH: return tr("Enable Framerate Graph", "Performance Overlay");

View file

@ -1829,6 +1829,9 @@ settings_dialog::settings_dialog(std::shared_ptr<gui_settings> gui_settings, std
ui->enableGamemode->setVisible(false);
#endif
m_emu_settings->EnhanceCheckBox(ui->playMusicDuringBoot, emu_settings_type::PlayMusicDuringBoot);
SubscribeTooltip(ui->playMusicDuringBoot, tooltips.settings.play_music_during_boot);
m_emu_settings->EnhanceCheckBox(ui->showShaderCompilationHint, emu_settings_type::ShowShaderCompilationHint);
SubscribeTooltip(ui->showShaderCompilationHint, tooltips.settings.show_shader_compilation_hint);

View file

@ -3009,6 +3009,13 @@
<string>Overlay Settings</string>
</property>
<layout class="QVBoxLayout" name="gb_overlay_settings_layout">
<item>
<widget class="QCheckBox" name="playMusicDuringBoot">
<property name="text">
<string>Play music during boot sequence</string>
</property>
</widget>
</item>
<item>
<widget class="QCheckBox" name="recordWithOverlays">
<property name="text">

View file

@ -159,6 +159,7 @@ public:
const QString use_native_interface = tr("Enables use of native HUD within the game window that can interact with game controllers.\nWhen disabled, regular Qt dialogs are used instead.\nCurrently, the on-screen keyboard only supports the English key layout.");
const QString record_with_overlays = tr("Enables recording with overlays.\nThis also affects screenshots.");
const QString pause_during_home_menu = tr("When enabled, opening the home menu will also pause emulation.\nWhile most games pause themselves while the home menu is shown, some do not.\nIn that case it can be helpful to pause the emulation whenever the home menu is open.");
const QString play_music_during_boot = tr("Play music during boot sequence if available.");
const QString perf_overlay_enabled = tr("Enables or disables the performance overlay.");
const QString perf_overlay_framerate_graph_enabled = tr("Enables or disables the framerate graph.");