Skip to content

Commit

Permalink
fix rg35xx plus batocera input
Browse files Browse the repository at this point in the history
  • Loading branch information
joyrider3774 committed Jan 29, 2024
1 parent 3908959 commit b3f6c2e
Showing 1 changed file with 12 additions and 11 deletions.
23 changes: 12 additions & 11 deletions src/CInput.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,18 +110,10 @@ void CInput::HandleJoystickButtonEvent(int Button, bool Value)
{
switch (Button)
{
#if defined(RG35XX_PLUS_BATOCERA)
case SDL_CONTROLLER_BUTTON_X:
#else
case SDL_CONTROLLER_BUTTON_Y:
#endif
Buttons.ButY = Value;
break;
#if defined(RG35XX_PLUS_BATOCERA)
case SDL_CONTROLLER_BUTTON_Y:
#else
case SDL_CONTROLLER_BUTTON_X:
#endif
Buttons.ButX = Value;
break;
case SDL_CONTROLLER_BUTTON_LEFTSHOULDER:
Expand All @@ -143,14 +135,14 @@ void CInput::HandleJoystickButtonEvent(int Button, bool Value)
Buttons.ButDpadRight = Value;
break;
//trim ui has A & B Buttons swapped
#if defined(TRIMUI_SMART_PRO) || defined(RG35XX_PLUS_BATOCERA)
#if defined(TRIMUI_SMART_PRO)
case SDL_CONTROLLER_BUTTON_B:
#else
case SDL_CONTROLLER_BUTTON_A:
#endif
Buttons.ButA = Value;
break;
#if defined(TRIMUI_SMART_PRO) || defined(RG35XX_PLUS_BATOCERA)
#if defined(TRIMUI_SMART_PRO)
case SDL_CONTROLLER_BUTTON_A:
#else
case SDL_CONTROLLER_BUTTON_B:
Expand All @@ -160,11 +152,20 @@ void CInput::HandleJoystickButtonEvent(int Button, bool Value)
case SDL_CONTROLLER_BUTTON_START:
Buttons.ButStart = Value;
break;
#if defined(RG35XX_PLUS_BATOCERA)
case SDL_CONTROLLER_BUTTON_GUIDE:
#else
case SDL_CONTROLLER_BUTTON_BACK:
#endif
Buttons.ButBack = Value;
break;
#if defined(RG35XX_PLUS_BATOCERA)
case SDL_CONTROLLER_BUTTON_BACK:
Buttons.ButQuit = Value;
break;
#endif
//trimui menu (=guide button)
#if defined(TRIMUI_SMART_PRO) || defined(RG35XX_PLUS_BATOCERA)
#if defined(TRIMUI_SMART_PRO)
case SDL_CONTROLLER_BUTTON_GUIDE:
Buttons.ButQuit = Value;
break;
Expand Down

0 comments on commit b3f6c2e

Please sign in to comment.