From 120f70b83b94420451039a8a2dd17142337fbfc8 Mon Sep 17 00:00:00 2001 From: adelikat Date: Mon, 15 May 2017 13:11:18 -0500 Subject: [PATCH] When key priority is Hotkey over input, account for hotkeys that are not handled through the CheckHotkey() method --- BizHawk.Client.EmuHawk/MainForm.Hotkey.cs | 17 +++++++++++++++++ BizHawk.Client.EmuHawk/MainForm.cs | 7 ++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs b/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs index 29207ed94b..6300f9ca54 100644 --- a/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs +++ b/BizHawk.Client.EmuHawk/MainForm.Hotkey.cs @@ -527,5 +527,22 @@ namespace BizHawk.Client.EmuHawk return true; } + + // Determines if the value is a hotkey that would be handled outside of the CheckHotkey method + private bool IsInternalHotkey(string trigger) + { + switch (trigger) + { + default: + return false; + case "Autohold": + case "Autofire": + case "Frame Advance": + case "Turbo": + case "Rewind": + case "Fast Forward": + return true; + } + } } } diff --git a/BizHawk.Client.EmuHawk/MainForm.cs b/BizHawk.Client.EmuHawk/MainForm.cs index 884c0e811f..2bf7bc2ad6 100644 --- a/BizHawk.Client.EmuHawk/MainForm.cs +++ b/BizHawk.Client.EmuHawk/MainForm.cs @@ -850,7 +850,12 @@ namespace BizHawk.Client.EmuHawk if (!handled) { HotkeyCoalescer.Receive(ie); - conInput.Receive(ie); + + // Check for hotkeys that may not be handled through Checkhotkey() method, reject controller input mapped to these + if (!triggers.Any(trigger => IsInternalHotkey(trigger))) + { + conInput.Receive(ie); + } } break;