Skip to content

Commit

Permalink
Revert commit a502906: let haxe manage sdl device id (#631)
Browse files Browse the repository at this point in the history
  • Loading branch information
yuxiaomao authored Nov 15, 2023
1 parent a502906 commit 8a63b99
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/sdl/sdl.c
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,11 @@ HL_PRIM bool HL_NAME(event_loop)( event_data *event ) {
break;
case SDL_CONTROLLERDEVICEADDED:
event->type = GControllerAdded;
SDL_GameController * controller = SDL_GameControllerOpen(e.cdevice.which);
SDL_Joystick* j = SDL_GameControllerGetJoystick(controller);
event->controller = SDL_JoystickInstanceID(j);
event->controller = e.jdevice.which;
break;
case SDL_CONTROLLERDEVICEREMOVED:
event->type = GControllerRemoved;
event->controller = e.cdevice.which;
event->controller = e.jdevice.which;
break;
case SDL_CONTROLLERBUTTONDOWN:
event->type = GControllerDown;
Expand Down

0 comments on commit 8a63b99

Please sign in to comment.