Merge pull request #2386 from mathieui/irhotkeys

Add hotkeys to increase/decrease the IR
This commit is contained in:
skidau 2015-05-12 13:05:53 +10:00
commit a6739c0960
5 changed files with 24 additions and 0 deletions

View File

@ -68,6 +68,9 @@ static const struct
{ "VolumeUp", 0, 0 /* wxMOD_NONE */ }, { "VolumeUp", 0, 0 /* wxMOD_NONE */ },
{ "VolumeToggleMute", 0, 0 /* wxMOD_NONE */ }, { "VolumeToggleMute", 0, 0 /* wxMOD_NONE */ },
{ "IncreaseIR", 0, 0 /* wxMOD_NONE */ },
{ "DecreaseIR", 0, 0 /* wxMOD_NONE */ },
{ "ToggleIR", 0, 0 /* wxMOD_NONE */ }, { "ToggleIR", 0, 0 /* wxMOD_NONE */ },
{ "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ }, { "ToggleAspectRatio", 0, 0 /* wxMOD_NONE */ },
{ "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ }, { "ToggleEFBCopies", 0, 0 /* wxMOD_NONE */ },

View File

@ -39,6 +39,9 @@ enum Hotkey
HK_VOLUME_UP, HK_VOLUME_UP,
HK_VOLUME_TOGGLE_MUTE, HK_VOLUME_TOGGLE_MUTE,
HK_INCREASE_IR,
HK_DECREASE_IR,
HK_TOGGLE_IR, HK_TOGGLE_IR,
HK_TOGGLE_AR, HK_TOGGLE_AR,
HK_TOGGLE_EFBCOPIES, HK_TOGGLE_EFBCOPIES,

View File

@ -38,6 +38,9 @@ const std::string hotkey_labels[] =
_trans("Volume Up"), _trans("Volume Up"),
_trans("Volume Toggle Mute"), _trans("Volume Toggle Mute"),
_trans("Increase IR"),
_trans("Decrease IR"),
_trans("Toggle IR"), _trans("Toggle IR"),
_trans("Toggle Aspect Ratio"), _trans("Toggle Aspect Ratio"),
_trans("Toggle EFB Copies"), _trans("Toggle EFB Copies"),

View File

@ -1353,6 +1353,18 @@ void CFrame::ParseHotkeys(wxKeyEvent &event)
if (++g_Config.iEFBScale > SCALE_4X) if (++g_Config.iEFBScale > SCALE_4X)
g_Config.iEFBScale = SCALE_AUTO; 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)) else if (IsHotkey(event, HK_TOGGLE_AR))
{ {
OSDChoice = 2; OSDChoice = 2;

View File

@ -203,6 +203,9 @@ const wxString hkText[] =
_("Volume Up"), _("Volume Up"),
_("Volume Toggle Mute"), _("Volume Toggle Mute"),
_("Increase IR"),
_("Decrease IR"),
_("Toggle IR"), _("Toggle IR"),
_("Toggle Aspect Ratio"), _("Toggle Aspect Ratio"),
_("Toggle EFB Copies"), _("Toggle EFB Copies"),