From a562c8727bffaea0de6dedb87f824594d8fe2f62 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Sun, 9 Feb 2020 13:15:21 -0800 Subject: [PATCH] video: SDL_ControllerButtonEvent button conversion. Uint8 needs casting to SDL_GameControllerButton. --- sim_video.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sim_video.c b/sim_video.c index cc0ebe72..a4fedf4e 100644 --- a/sim_video.c +++ b/sim_video.c @@ -1304,9 +1304,10 @@ void vid_controller_button (SDL_ControllerButtonEvent *event) SDL_JoyButtonEvent e; SDL_GameControllerButtonBind b; SDL_GameController *c; + SDL_GameControllerButton button = (SDL_GameControllerButton)event->button; c = SDL_GameControllerFromInstanceID (event->which); - b = SDL_GameControllerGetBindForButton (c, event->button); + b = SDL_GameControllerGetBindForButton (c, button); e.which = event->which; e.button = b.value.button; e.state = event->state;