mirror of
https://github.com/open-simh/simh.git
synced 2026-05-03 06:39:03 +00:00
video: SDL_ControllerButtonEvent button conversion.
Uint8 needs casting to SDL_GameControllerButton.
This commit is contained in:
committed by
Mark Pizzolato
parent
78f8599024
commit
a562c8727b
@@ -1304,9 +1304,10 @@ void vid_controller_button (SDL_ControllerButtonEvent *event)
|
|||||||
SDL_JoyButtonEvent e;
|
SDL_JoyButtonEvent e;
|
||||||
SDL_GameControllerButtonBind b;
|
SDL_GameControllerButtonBind b;
|
||||||
SDL_GameController *c;
|
SDL_GameController *c;
|
||||||
|
SDL_GameControllerButton button = (SDL_GameControllerButton)event->button;
|
||||||
|
|
||||||
c = SDL_GameControllerFromInstanceID (event->which);
|
c = SDL_GameControllerFromInstanceID (event->which);
|
||||||
b = SDL_GameControllerGetBindForButton (c, event->button);
|
b = SDL_GameControllerGetBindForButton (c, button);
|
||||||
e.which = event->which;
|
e.which = event->which;
|
||||||
e.button = b.value.button;
|
e.button = b.value.button;
|
||||||
e.state = event->state;
|
e.state = event->state;
|
||||||
|
|||||||
Reference in New Issue
Block a user