video: Take address of SDL event union member rather than casting pointer.

This commit is contained in:
Lars Brinkhoff 2020-02-04 09:43:35 +01:00
parent 593f36aec7
commit 05e4babe24

View file

@ -1691,16 +1691,16 @@ while (vid_active) {
case SDL_KEYDOWN: case SDL_KEYDOWN:
case SDL_KEYUP: case SDL_KEYUP:
vid_key ((SDL_KeyboardEvent*)&event); vid_key (&event.key);
break; break;
case SDL_MOUSEBUTTONDOWN: case SDL_MOUSEBUTTONDOWN:
case SDL_MOUSEBUTTONUP: case SDL_MOUSEBUTTONUP:
vid_mouse_button ((SDL_MouseButtonEvent*)&event); vid_mouse_button (&event.button);
break; break;
case SDL_MOUSEMOTION: case SDL_MOUSEMOTION:
vid_mouse_move ((SDL_MouseMotionEvent*)&event); vid_mouse_move (&event.motion);
break; break;
#if SDL_MAJOR_VERSION != 1 #if SDL_MAJOR_VERSION != 1
case SDL_WINDOWEVENT: case SDL_WINDOWEVENT: