mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-10 22:28:03 -05:00
yuzu: Add volume up/down hotkeys
This commit is contained in:
@ -1014,8 +1014,18 @@ void GMainWindow::InitializeHotkeys() {
|
||||
Settings::values.use_docked_mode.GetValue(), *system);
|
||||
dock_status_button->setChecked(Settings::values.use_docked_mode.GetValue());
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Mute Audio"),
|
||||
connect_shortcut(QStringLiteral("Audio Mute/Unmute"),
|
||||
[] { Settings::values.audio_muted = !Settings::values.audio_muted; });
|
||||
connect_shortcut(QStringLiteral("Audio Volume Down"), [] {
|
||||
const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
|
||||
const auto new_volume = std::max(current_volume - 5, 0);
|
||||
Settings::values.volume.SetValue(static_cast<u8>(new_volume));
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Audio Volume Up"), [] {
|
||||
const auto current_volume = static_cast<int>(Settings::values.volume.GetValue());
|
||||
const auto new_volume = std::min(current_volume + 5, 100);
|
||||
Settings::values.volume.SetValue(static_cast<u8>(new_volume));
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] {
|
||||
Settings::values.disable_fps_limit.SetValue(!Settings::values.disable_fps_limit.GetValue());
|
||||
});
|
||||
|
Reference in New Issue
Block a user