mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-24 19:27:27 +00:00
fix: don't output music if null backend is selected
This commit is contained in:
parent
913ae9351d
commit
b01b40ece0
1 changed files with 7 additions and 4 deletions
|
@ -116,7 +116,8 @@ std::string ConvertConnectCodeForGame(const std::string& input)
|
||||||
signed char full_width_shift_jis_hashtag[] = {-127, -108, 0}; // 0x81, 0x94, 0x00
|
signed char full_width_shift_jis_hashtag[] = {-127, -108, 0}; // 0x81, 0x94, 0x00
|
||||||
std::string connect_code(input);
|
std::string connect_code(input);
|
||||||
// SLIPPITODO:Not the best use of ReplaceAll. potential bug if more than one '#' found.
|
// SLIPPITODO:Not the best use of ReplaceAll. potential bug if more than one '#' found.
|
||||||
connect_code = ReplaceAll(connect_code, "#", std::string(reinterpret_cast<const char*>(full_width_shift_jis_hashtag)));
|
connect_code = ReplaceAll(
|
||||||
|
connect_code, "#", std::string(reinterpret_cast<const char*>(full_width_shift_jis_hashtag)));
|
||||||
// fixed length + full width (two byte) hashtag +1, null terminator +1
|
// fixed length + full width (two byte) hashtag +1, null terminator +1
|
||||||
connect_code.resize(CONNECT_CODE_LENGTH + 2);
|
connect_code.resize(CONNECT_CODE_LENGTH + 2);
|
||||||
return connect_code;
|
return connect_code;
|
||||||
|
@ -3310,8 +3311,8 @@ void CEXISlippi::ConfigureJukebox()
|
||||||
// Exclusive WASAPI will prevent Jukebox from running on the main device, relegating it to another
|
// Exclusive WASAPI will prevent Jukebox from running on the main device, relegating it to another
|
||||||
// device at random, so we will simply prevent Jukebox from running if the user is using WASAPI on
|
// device at random, so we will simply prevent Jukebox from running if the user is using WASAPI on
|
||||||
// the default device (assuming they don't select the default device directly).
|
// the default device (assuming they don't select the default device directly).
|
||||||
#ifdef _WIN32
|
|
||||||
std::string backend = Config::Get(Config::MAIN_AUDIO_BACKEND);
|
std::string backend = Config::Get(Config::MAIN_AUDIO_BACKEND);
|
||||||
|
#ifdef _WIN32
|
||||||
std::string audio_device = Config::Get(Config::MAIN_WASAPI_DEVICE);
|
std::string audio_device = Config::Get(Config::MAIN_WASAPI_DEVICE);
|
||||||
if (backend.find(BACKEND_WASAPI) != std::string::npos && audio_device == "default")
|
if (backend.find(BACKEND_WASAPI) != std::string::npos && audio_device == "default")
|
||||||
{
|
{
|
||||||
|
@ -3321,8 +3322,10 @@ void CEXISlippi::ConfigureJukebox()
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
int dolphin_system_volume =
|
bool no_audio_output = backend.find(BACKEND_NULLSOUND) != std::string::npos;
|
||||||
Config::Get(Config::MAIN_AUDIO_MUTED) ? 0 : Config::Get(Config::MAIN_AUDIO_VOLUME);
|
int dolphin_system_volume = Config::Get(Config::MAIN_AUDIO_MUTED) || no_audio_output ?
|
||||||
|
0 :
|
||||||
|
Config::Get(Config::MAIN_AUDIO_VOLUME);
|
||||||
|
|
||||||
int dolphin_music_volume = Config::Get(Config::SLIPPI_JUKEBOX_VOLUME);
|
int dolphin_music_volume = Config::Get(Config::SLIPPI_JUKEBOX_VOLUME);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue