Make physical back button act as left mouse

This might help get proper functionality without recoding in ruby
This commit is contained in:
RadialApps 2017-08-09 14:31:21 +05:30
parent 051cde9ff8
commit 1a6ad68352

View file

@ -324,6 +324,11 @@ void EventThread::process(RGSSThreadData &rtData)
rtData.rqReset.set(); rtData.rqReset.set();
break; break;
} }
if (event.key.keysym.scancode == SDL_SCANCODE_AC_BACK)
{
mouseState.buttons[SDL_BUTTON_RIGHT] = true;
}
keyStates[event.key.keysym.scancode] = true; keyStates[event.key.keysym.scancode] = true;
break; break;
@ -340,6 +345,11 @@ void EventThread::process(RGSSThreadData &rtData)
} }
keyStates[event.key.keysym.scancode] = false; keyStates[event.key.keysym.scancode] = false;
if (event.key.keysym.scancode == SDL_SCANCODE_AC_BACK)
{
mouseState.buttons[SDL_BUTTON_RIGHT] = false;
}
break; break;
case SDL_JOYBUTTONDOWN : case SDL_JOYBUTTONDOWN :