mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-31 13:50:03 +00:00 
			
		
		
		
	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:
		
							parent
							
								
									14924e9db3
								
							
						
					
					
						commit
						aa84022704
					
				
					 5 changed files with 16 additions and 2 deletions
				
			
		|  | @ -58,7 +58,7 @@ const std::array<std::array<int, 5>, Settings::NativeAnalog::NumAnalogs> Config: | |||
| // This must be in alphabetical order according to action name as it must have the same order as
 | ||||
| // UISetting::values.shortcuts, which is alphabetically ordered.
 | ||||
| // clang-format off
 | ||||
| const std::array<UISettings::Shortcut, 23> default_hotkeys{ | ||||
| const std::array<UISettings::Shortcut, 24> default_hotkeys{ | ||||
|     {{QStringLiteral("Advance Frame"),            QStringLiteral("Main Window"), {QStringLiteral("\\"), Qt::ApplicationShortcut}}, | ||||
|      {QStringLiteral("Capture Screenshot"),       QStringLiteral("Main Window"), {QStringLiteral("Ctrl+P"), Qt::ApplicationShortcut}}, | ||||
|      {QStringLiteral("Continue/Pause Emulation"), QStringLiteral("Main Window"), {QStringLiteral("F4"), Qt::WindowShortcut}}, | ||||
|  | @ -70,6 +70,7 @@ const std::array<UISettings::Shortcut, 23> default_hotkeys{ | |||
|      {QStringLiteral("Load Amiibo"),              QStringLiteral("Main Window"), {QStringLiteral("F2"), Qt::ApplicationShortcut}}, | ||||
|      {QStringLiteral("Load File"),                QStringLiteral("Main Window"), {QStringLiteral("Ctrl+O"), Qt::WindowShortcut}}, | ||||
|      {QStringLiteral("Load from Newest Slot"),    QStringLiteral("Main Window"), {QStringLiteral("Ctrl+V"), Qt::WindowShortcut}}, | ||||
|      {QStringLiteral("Mute Audio"),               QStringLiteral("Main Window"), {QStringLiteral("Ctrl+M"), Qt::WindowShortcut}}, | ||||
|      {QStringLiteral("Remove Amiibo"),            QStringLiteral("Main Window"), {QStringLiteral("F3"), Qt::ApplicationShortcut}}, | ||||
|      {QStringLiteral("Restart Emulation"),        QStringLiteral("Main Window"), {QStringLiteral("F6"), Qt::WindowShortcut}}, | ||||
|      {QStringLiteral("Rotate Screens Upright"),   QStringLiteral("Main Window"), {QStringLiteral("F8"), Qt::WindowShortcut}}, | ||||
|  |  | |||
|  | @ -596,6 +596,9 @@ void GMainWindow::InitializeHotkeys() { | |||
|             &QShortcut::activated, ui->action_Load_from_Newest_Slot, &QAction::trigger); | ||||
|     connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Save to Oldest Slot"), this), | ||||
|             &QShortcut::activated, ui->action_Save_to_Oldest_Slot, &QAction::trigger); | ||||
|     connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Mute Audio"), this), | ||||
|             &QShortcut::activated, this, | ||||
|             [] { Settings::values.audio_muted = !Settings::values.audio_muted; }); | ||||
| } | ||||
| 
 | ||||
| void GMainWindow::ShowUpdaterWidgets() { | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue