define R77 paddle mapping for front ports AND OTA adapter

use "Grab Mouse" to switch mouse cursor in light gun games
This commit is contained in:
thrust26 2020-02-22 19:03:21 +01:00
parent e9698aea86
commit de7284c1a0
2 changed files with 10 additions and 14 deletions

View File

@ -849,19 +849,17 @@ PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRight
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftPaddlesMapping = {
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
#else
{Event::PaddleZeroAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same time
//{Event::PaddleZeroDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::PaddleZeroIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::PaddleZeroFire, 0},
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
#else
{Event::PaddleOneAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleOneDecrease, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},
@ -871,19 +869,17 @@ PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultLeftP
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
PhysicalJoystickHandler::EventMappingArray PhysicalJoystickHandler::DefaultRightPaddlesMapping = {
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::Z, JoyDir::ANALOG},
#else
{Event::PaddleTwoAnalog, JOY_CTRL_NONE, JoyAxis::X, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleTwoDecrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::POS},
//{Event::PaddleTwoIncrease, JOY_CTRL_NONE, JoyAxis::X, JoyDir::NEG},
{Event::PaddleTwoFire, 0},
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#if defined(RETRON77)
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::A3, JoyDir::ANALOG},
#else
{Event::PaddleThreeAnalog, JOY_CTRL_NONE, JoyAxis::Y, JoyDir::ANALOG},
#endif
// Current code does NOT allow digital and anlog events on the same axis at the same
//{Event::PaddleThreeDecrease,JOY_CTRL_NONE, JoyAxis::Y, JoyDir::POS},

View File

@ -862,23 +862,23 @@ void FrameBuffer::setCursorState()
// Show/hide cursor in UI/emulation mode based on 'cursor' setting
int cursor = myOSystem.settings().getInt("cursor");
// always enable cursor in lightgun games
if (usesLightgun)
cursor |= 1;
if (usesLightgun && !myGrabMouse)
cursor |= 1; // +Emulation
switch(cursor)
{
case 0:
case 0: // -UI, -Emulation
showCursor(false);
break;
case 1:
showCursor(emulation);
showCursor(emulation); //-UI, +Emulation
myGrabMouse = false; // disable grab while cursor is shown in emulation
break;
case 2:
case 2: // +UI, -Emulation
showCursor(!emulation);
break;
case 3:
showCursor(true);
showCursor(true); // +UI, +Emulation
myGrabMouse = false; // disable grab while cursor is shown in emulation
break;
}