[Controller] Set gameControllerID if a gamepad is connected mid-gameplay

This commit is contained in:
wheremyfoodat 2023-06-28 01:51:21 +03:00
parent 29806ff8e5
commit eff25180d5

View file

@ -141,6 +141,7 @@ void Emulator::run() {
case SDL_CONTROLLERDEVICEADDED:
if (gameController == nullptr) {
gameController = SDL_GameControllerOpen(event.cdevice.which);
gameControllerID = event.cdevice.which;
}
break;