From ea709b6c125f1d433388dc5882420ff0f50d2cb3 Mon Sep 17 00:00:00 2001 From: mathieui Date: Sun, 10 May 2015 02:02:47 +0200 Subject: [PATCH] Add hotkeys to increase/decrease the IR --- Source/Core/Core/ConfigManager.cpp | 3 +++ Source/Core/Core/CoreParameter.h | 3 +++ Source/Core/Core/HotkeyManager.cpp | 3 +++ Source/Core/DolphinWX/Frame.cpp | 12 ++++++++++++ Source/Core/DolphinWX/HotkeyDlg.cpp | 3 +++ 5 files changed, 24 insertions(+) diff --git a/Source/Core/Core/ConfigManager.cpp b/Source/Core/Core/ConfigManager.cpp index 08f030d07a..057fc618f8 100644 --- a/Source/Core/Core/ConfigManager.cpp +++ b/Source/Core/Core/ConfigManager.cpp @@ -68,6 +68,9 @@ static const struct { "VolumeUp", 0, 0 /* wxMOD_NONE */ }, { "VolumeToggleMute", 0, 0 /* wxMOD_NONE */ }, + { "IncreaseIR", 0, 0 /* wxMOD_NONE */ }, + { "DecreaseIR", 0, 0 /* wxMOD_NONE */ }, + { "ToggleIR", 0, 0 /* wxMOD_NONE */ }, { "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ }, { "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ }, diff --git a/Source/Core/Core/CoreParameter.h b/Source/Core/Core/CoreParameter.h index 381128a1f0..6a17fb9c91 100644 --- a/Source/Core/Core/CoreParameter.h +++ b/Source/Core/Core/CoreParameter.h @@ -39,6 +39,9 @@ enum Hotkey HK_VOLUME_UP, HK_VOLUME_TOGGLE_MUTE, + HK_INCREASE_IR, + HK_DECREASE_IR, + HK_TOGGLE_IR, HK_TOGGLE_AR, HK_TOGGLE_EFBCOPIES, diff --git a/Source/Core/Core/HotkeyManager.cpp b/Source/Core/Core/HotkeyManager.cpp index c1f1e0f2f2..678cc694ad 100644 --- a/Source/Core/Core/HotkeyManager.cpp +++ b/Source/Core/Core/HotkeyManager.cpp @@ -38,6 +38,9 @@ const std::string hotkey_labels[] = _trans("Volume Up"), _trans("Volume Toggle Mute"), + _trans("Increase IR"), + _trans("Decrease IR"), + _trans("Toggle IR"), _trans("Toggle Aspect Ratio"), _trans("Toggle EFB Copies"), diff --git a/Source/Core/DolphinWX/Frame.cpp b/Source/Core/DolphinWX/Frame.cpp index 05a643fd8a..7ff7d12bc3 100644 --- a/Source/Core/DolphinWX/Frame.cpp +++ b/Source/Core/DolphinWX/Frame.cpp @@ -1353,6 +1353,18 @@ void CFrame::ParseHotkeys(wxKeyEvent &event) if (++g_Config.iEFBScale > SCALE_4X) g_Config.iEFBScale = SCALE_AUTO; } + else if (IsHotkey(event, HK_INCREASE_IR)) + { + OSDChoice = 1; + if (++g_Config.iEFBScale > SCALE_4X) + g_Config.iEFBScale = SCALE_4X; + } + else if (IsHotkey(event, HK_DECREASE_IR)) + { + OSDChoice = 1; + if (--g_Config.iEFBScale < SCALE_1X) + g_Config.iEFBScale = SCALE_1X; + } else if (IsHotkey(event, HK_TOGGLE_AR)) { OSDChoice = 2; diff --git a/Source/Core/DolphinWX/HotkeyDlg.cpp b/Source/Core/DolphinWX/HotkeyDlg.cpp index 88dcb599dd..3938508dd8 100644 --- a/Source/Core/DolphinWX/HotkeyDlg.cpp +++ b/Source/Core/DolphinWX/HotkeyDlg.cpp @@ -206,6 +206,9 @@ const wxString hkText[] = _("Volume Up"), _("Volume Toggle Mute"), + _("Increase IR"), + _("Decrease IR"), + _("Toggle IR"), _("Toggle Aspect Ratio"), _("Toggle EFB Copies"),