fix directionals and other common buttons being dropped from controller inputs when hotkeys overrode controller inputs

This commit is contained in:
CasualPokePlayer 2023-05-07 00:59:24 -07:00
parent 4a752f66b7
commit 68cd28c28a
2 changed files with 7 additions and 2 deletions

View File

@ -593,6 +593,7 @@ namespace BizHawk.Client.EmuHawk
case "Rewind":
case "Fast Forward":
case "Open RA Overlay":
return true;
case "RA Up":
case "RA Down":
case "RA Left":
@ -600,7 +601,8 @@ namespace BizHawk.Client.EmuHawk
case "RA Confirm":
case "RA Cancel":
case "RA Quit":
return true;
// don't consider these keys outside of RAIntegration overlay being active
return RA is RAIntegration { OverlayActive: true };
}
}
}

View File

@ -235,6 +235,8 @@ namespace BizHawk.Client.EmuHawk
_mainForm.EmuClient.BeforeQuickLoad += QuickLoadCallback;
}
public bool OverlayActive => RA.IsOverlayFullyVisible();
public override void Update()
{
if (RA.HardcoreModeIsActive())
@ -247,7 +249,7 @@ namespace BizHawk.Client.EmuHawk
RA.SetPaused(true);
}
if (!RA.IsOverlayFullyVisible()) return;
if (!OverlayActive) return;
var ci = new RAInterface.ControllerInput
{
@ -263,6 +265,7 @@ namespace BizHawk.Client.EmuHawk
RA.NavigateOverlay(ref ci);
// todo: suppress user inputs with overlay active?
// cpp: well this happens now if hotkeys override controller inputs
}
public override void OnFrameAdvance()