SDL: Ensure switching gamepad uses haptic from the right gamepad

This commit is contained in:
Jeffrey Pfau 2015-04-19 03:43:00 -07:00
parent 3203158b1d
commit b84c421865
1 changed files with 3 additions and 0 deletions

View File

@ -223,6 +223,9 @@ void GBASDLPlayerChangeJoystick(struct GBASDLEvents* events, struct GBASDLPlayer
events->joysticksClaimed[player->playerId] = index;
player->joystickIndex = index;
player->joystick = events->joysticks[index];
#if SDL_VERSION_ATLEAST(2, 0, 0)
player->haptic = events->haptic[index];
#endif
}
static void _pauseAfterFrame(struct GBAThread* context) {