mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 04:11:18 +00:00
Turns out the issue was with fullscreen! All I have to do is factor in the resolution/real window size ratio apparently (which was already done before)
Also changed movemousex/y to INT32
This commit is contained in:
parent
758e9c4558
commit
10cbe2c82b
1 changed files with 3 additions and 3 deletions
|
@ -606,7 +606,7 @@ static void Impl_HandleKeyboardEvent(SDL_KeyboardEvent evt, Uint32 type)
|
|||
if (event.data1) D_PostEvent(&event);
|
||||
}
|
||||
|
||||
static int mousemovex, mousemovey;
|
||||
static INT32 mousemovex, mousemovey;
|
||||
|
||||
static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
|
||||
{
|
||||
|
@ -629,8 +629,8 @@ static void Impl_HandleMouseMotionEvent(SDL_MouseMotionEvent evt)
|
|||
//event.data3 = -evt.yrel;
|
||||
if (SDL_GetMouseFocus() == window && SDL_GetKeyboardFocus() == window)
|
||||
{
|
||||
mousemovex += evt.xrel;
|
||||
mousemovey += -evt.yrel;
|
||||
mousemovex += (INT32)lround( evt.xrel * ((float)wwidth / (float)realwidth));
|
||||
mousemovey += (INT32)lround(-evt.yrel * ((float)wheight / (float)realheight));
|
||||
SDL_SetWindowGrab(window, SDL_TRUE);
|
||||
}
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue