fixed global hotkey logic and warning

This commit is contained in:
thrust26 2020-12-17 17:39:28 +01:00
parent d7bb07fc55
commit c9cd7cb4ef
1 changed files with 2 additions and 5 deletions

View File

@ -453,8 +453,6 @@ AdjustFunction EventHandler::cycleAdjustSetting(int direction)
case AdjustGroup::INPUT: case AdjustGroup::INPUT:
{ {
const bool grabMouseAllowed = myOSystem.frameBuffer().grabMouseAllowed(); const bool grabMouseAllowed = myOSystem.frameBuffer().grabMouseAllowed();
const bool analog = myOSystem.console().leftController().isAnalog()
|| myOSystem.console().rightController().isAnalog();
const bool joystick = isJoystick(myOSystem.console().leftController()) const bool joystick = isJoystick(myOSystem.console().leftController())
|| isJoystick(myOSystem.console().rightController()); || isJoystick(myOSystem.console().rightController());
const bool paddle = isPaddle(myOSystem.console().leftController()) const bool paddle = isPaddle(myOSystem.console().leftController())
@ -472,7 +470,7 @@ AdjustFunction EventHandler::cycleAdjustSetting(int direction)
repeat = (!grabMouseAllowed && myAdjustSetting == AdjustSetting::GRAB_MOUSE) repeat = (!grabMouseAllowed && myAdjustSetting == AdjustSetting::GRAB_MOUSE)
|| (!joystick || (!joystick
&& (myAdjustSetting == AdjustSetting::DEADZONE && (myAdjustSetting == AdjustSetting::DEADZONE
|| myAdjustSetting == AdjustSetting::FOUR_DIRECTIONS) || myAdjustSetting == AdjustSetting::FOUR_DIRECTIONS))
|| (!paddle || (!paddle
&& (myAdjustSetting == AdjustSetting::ANALOG_SENSITIVITY && (myAdjustSetting == AdjustSetting::ANALOG_SENSITIVITY
|| myAdjustSetting == AdjustSetting::DEJITTER_AVERAGING || myAdjustSetting == AdjustSetting::DEJITTER_AVERAGING
@ -490,8 +488,7 @@ AdjustFunction EventHandler::cycleAdjustSetting(int direction)
|| ((!hasMouseControl() || !useMouse) || ((!hasMouseControl() || !useMouse)
&& myAdjustSetting == AdjustSetting::MOUSE_CONTROL) && myAdjustSetting == AdjustSetting::MOUSE_CONTROL)
|| ((!paddle || !useMouse) || ((!paddle || !useMouse)
&& myAdjustSetting == AdjustSetting::MOUSE_RANGE) && myAdjustSetting == AdjustSetting::MOUSE_RANGE);
);
break; break;
} }