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
1 changed files with 10 additions and 0 deletions

View File

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