mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-04-18 03:31:31 +12:00
[Controller] Set gameControllerID if a gamepad is connected mid-gameplay
This commit is contained in:
parent
29806ff8e5
commit
eff25180d5
1 changed files with 1 additions and 0 deletions
|
@ -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;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue