Skip to content

Commit

Permalink
Revert commit a502906: let haxe manage sdl device id (HaxeFoundation#631
Browse files Browse the repository at this point in the history
)
  • Loading branch information
yuxiaomao authored and RandomityGuy committed Jan 11, 2024
1 parent acb944a commit bdd9836
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 @@ -271,13 +271,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 bdd9836

Please sign in to comment.