From 3b298b7c42442f64e88af46aee406c75e41422c4 Mon Sep 17 00:00:00 2001 From: mazmazz Date: Fri, 23 Nov 2018 21:43:50 -0500 Subject: [PATCH] Adjust mouse scaling calculation for SDL in windowed mode --- src/sdl/i_video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index 3cc29dbb..e2c38efb 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -864,8 +864,8 @@ void I_GetEvent(void) //SDL_memset(&event, 0, sizeof(event_t)); event.type = ev_mouse; event.data1 = 0; - event.data2 = (INT32)lround(mousemovex * ((float)wwidth / (float)realwidth)); - event.data3 = (INT32)lround(mousemovey * ((float)wheight / (float)realheight)); + event.data2 = (INT32)lround(mousemovex * ((float)realwidth / (float)wwidth)); + event.data3 = (INT32)lround(mousemovey * ((float)realheight / (float)wheight)); D_PostEvent(&event); }