Port yuzu-emu/yuzu#4164: "hotkeys: Add a "Mute Audio" hotkey" (#5463)

Co-authored-by: Kewlan <colin_rehn@hotmail.com>
This commit is contained in:
Tobias 2022-11-04 20:25:57 +01:00 committed by GitHub
parent 14924e9db3
commit aa84022704
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 16 additions and 2 deletions

View file

@ -131,6 +131,13 @@ void LogSettings() {
log_setting("Debugging_GdbstubPort", values.gdbstub_port);
}
float Volume() {
if (values.audio_muted) {
return 0.0f;
}
return values.volume;
}
void LoadProfile(int index) {
Settings::values.current_input_profile = Settings::values.input_profiles[index];
Settings::values.current_input_profile_index = index;

View file

@ -210,6 +210,7 @@ struct Values {
bool use_vsync_new;
// Audio
bool audio_muted;
bool enable_dsp_lle;
bool enable_dsp_lle_multithread;
std::string sink_id;
@ -244,6 +245,8 @@ struct Values {
u64 audio_bitrate;
} extern values;
float Volume();
// a special value for Values::region_value indicating that citra will automatically select a region
// value to fit the region lockout info of the game
static constexpr int REGION_VALUE_AUTO_SELECT = -1;