[Controller] Set gameControllerID if a gamepad is connected mid-gameplay
This commit is contained in:
@@ -141,6 +141,7 @@ void Emulator::run() {
|
|||||||
case SDL_CONTROLLERDEVICEADDED:
|
case SDL_CONTROLLERDEVICEADDED:
|
||||||
if (gameController == nullptr) {
|
if (gameController == nullptr) {
|
||||||
gameController = SDL_GameControllerOpen(event.cdevice.which);
|
gameController = SDL_GameControllerOpen(event.cdevice.which);
|
||||||
|
gameControllerID = event.cdevice.which;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user