File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -114,7 +114,7 @@ static bool filterevent(const SDL_Event &event)
114114 case SDL_MOUSEMOTION:
115115 if (grabinput && !relativemouse && !(SDL_GetWindowFlags (screen) & SDL_WINDOW_FULLSCREEN))
116116 {
117- if (event.motion .x == screenw / 2 && event.motion .y == screenh / 2 )
117+ if (event.motion .x == hudw () / 2 && event.motion .y == hudh () / 2 )
118118 {
119119 return false ; // ignore any motion events generated by SDL_WarpMouse
120120 }
@@ -188,7 +188,7 @@ static void resetmousemotion()
188188{
189189 if (grabinput && !relativemouse && !(SDL_GetWindowFlags (screen) & SDL_WINDOW_FULLSCREEN))
190190 {
191- SDL_WarpMouseInWindow (screen, screenw / 2 , screenh / 2 ); // move to middle of screen
191+ SDL_WarpMouseInWindow (screen, hudw () / 2 , hudh () / 2 ); // move to middle of screen
192192 }
193193}
194194
@@ -328,8 +328,8 @@ void checkinput(int map)
328328 if (!(SDL_GetWindowFlags (screen) & SDL_WINDOW_FULLSCREEN))
329329 {
330330 // need to cast enums to ints for std's clamp implementation
331- scr_w = std::clamp (screenw , static_cast <int >(SCR_MINW), static_cast <int >(SCR_MAXW));
332- scr_h = std::clamp (screenh , static_cast <int >(SCR_MINH), static_cast <int >(SCR_MAXH));
331+ scr_w = std::clamp (hudw () , static_cast <int >(SCR_MINW), static_cast <int >(SCR_MAXW));
332+ scr_h = std::clamp (hudh () , static_cast <int >(SCR_MINH), static_cast <int >(SCR_MAXH));
333333 }
334334 gl_resize ();
335335 break ;
You can’t perform that action at this time.
0 commit comments