mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-02-22 20:57:12 +01:00
add config option to enable/disable boot sound, don't play during OSScreen section
This commit is contained in:
parent
dc127e5e61
commit
cab8a1f3c5
@ -185,9 +185,16 @@ int Latte_ThreadEntry()
|
||||
// before doing anything with game specific shaders, we need to wait for graphic packs to finish loading
|
||||
GraphicPack2::WaitUntilReady();
|
||||
|
||||
// initialise resources for playing bootup sound
|
||||
if(GetConfig().play_boot_sound)
|
||||
LatteThread_InitBootSound();
|
||||
|
||||
// load disk shader cache
|
||||
LatteShaderCache_Load();
|
||||
|
||||
// free resources for playing boot sound
|
||||
LatteThread_ShutdownBootSound();
|
||||
|
||||
// init registers
|
||||
Latte_LoadInitialRegisters();
|
||||
// let CPU thread know the GPU is done initializing
|
||||
@ -198,11 +205,9 @@ int Latte_ThreadEntry()
|
||||
std::this_thread::yield();
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||
LatteThread_HandleOSScreen();
|
||||
LatteThread_StreamBootSound();
|
||||
if (Latte_GetStopSignal())
|
||||
LatteThread_Exit();
|
||||
}
|
||||
LatteThread_ShutdownBootSound();
|
||||
gxRingBufferReadPtr = gx2WriteGatherPipe.gxRingBuffer;
|
||||
LatteCP_ProcessRingbuffer();
|
||||
cemu_assert_debug(false); // should never reach
|
||||
|
@ -63,6 +63,7 @@ void CemuConfig::Load(XMLConfigParser& parser)
|
||||
fullscreen = parser.get("fullscreen", fullscreen);
|
||||
proxy_server = parser.get("proxy_server", "");
|
||||
disable_screensaver = parser.get("disable_screensaver", disable_screensaver);
|
||||
play_boot_sound = parser.get("play_boot_sound", play_boot_sound);
|
||||
console_language = parser.get("console_language", console_language.GetInitValue());
|
||||
|
||||
window_position.x = parser.get("window_position").get("x", -1);
|
||||
@ -364,6 +365,7 @@ void CemuConfig::Save(XMLConfigParser& parser)
|
||||
config.set<bool>("fullscreen", fullscreen);
|
||||
config.set("proxy_server", proxy_server.GetValue().c_str());
|
||||
config.set<bool>("disable_screensaver", disable_screensaver);
|
||||
config.set<bool>("play_boot_sound", play_boot_sound);
|
||||
|
||||
// config.set("cpu_mode", cpu_mode.GetValue());
|
||||
//config.set("console_region", console_region.GetValue());
|
||||
|
@ -378,6 +378,7 @@ struct CemuConfig
|
||||
#endif
|
||||
ConfigValue<bool> disable_screensaver{DISABLE_SCREENSAVER_DEFAULT};
|
||||
#undef DISABLE_SCREENSAVER_DEFAULT
|
||||
ConfigValue<bool> play_boot_sound{true};
|
||||
|
||||
std::vector<std::string> game_paths;
|
||||
std::mutex game_cache_entries_mutex;
|
||||
|
@ -182,8 +182,13 @@ wxPanel* GeneralSettings2::AddGeneralPage(wxNotebook* notebook)
|
||||
m_disable_screensaver->SetToolTip(_("Prevents the system from activating the screen saver or going to sleep while running a game."));
|
||||
second_row->Add(m_disable_screensaver, 0, botflag, 5);
|
||||
|
||||
m_play_boot_sound = new wxCheckBox(box, wxID_ANY, _("Enable intro sound"));
|
||||
m_play_boot_sound->SetToolTip(_("Play bootSound file while compiling shaders/pipelines."));
|
||||
second_row->Add(m_play_boot_sound, 0, botflag, 5);
|
||||
|
||||
// Enable/disable feral interactive gamemode
|
||||
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
|
||||
second_row->AddSpacer(10);
|
||||
m_feral_gamemode = new wxCheckBox(box, wxID_ANY, _("Enable Feral GameMode"));
|
||||
m_feral_gamemode->SetToolTip(_("Use FeralInteractive GameMode if installed."));
|
||||
second_row->Add(m_feral_gamemode, 0, botflag, 5);
|
||||
@ -912,6 +917,8 @@ void GeneralSettings2::StoreConfig()
|
||||
ScreenSaver::SetInhibit(config.disable_screensaver);
|
||||
}
|
||||
|
||||
config.play_boot_sound = m_play_boot_sound->IsChecked();
|
||||
|
||||
if (!LaunchSettings::GetMLCPath().has_value())
|
||||
config.SetMLCPath(wxHelper::MakeFSPath(m_mlc_path->GetValue()), false);
|
||||
|
||||
@ -1518,6 +1525,7 @@ void GeneralSettings2::ApplyConfig()
|
||||
|
||||
m_permanent_storage->SetValue(config.permanent_storage);
|
||||
m_disable_screensaver->SetValue(config.disable_screensaver);
|
||||
m_play_boot_sound->SetValue(config.play_boot_sound);
|
||||
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
|
||||
m_feral_gamemode->SetValue(config.feral_gamemode);
|
||||
#endif
|
||||
|
@ -44,6 +44,7 @@ private:
|
||||
wxCheckBox* m_auto_update, *m_save_screenshot;
|
||||
wxCheckBox* m_permanent_storage;
|
||||
wxCheckBox* m_disable_screensaver;
|
||||
wxCheckBox* m_play_boot_sound;
|
||||
#if BOOST_OS_LINUX && defined(ENABLE_FERAL_GAMEMODE)
|
||||
wxCheckBox* m_feral_gamemode;
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user