mirror of https://github.com/encounter/SDL.git
Update SDL_windowswindow.c (#6225)
Clip rectangle set to int(left+width/2) , int(top+height/2) , int(left+width/2)+1 , int(top+height/2)+1 a 1x1 box On even-valued resolution, cursor is stable at bottom-right central pixel On odd-valued resolution, cursor is stable at exact central pixel. this is the desired behaviour
This commit is contained in:
parent
929d5b80c6
commit
228b9fb517
|
@ -1309,9 +1309,9 @@ WIN_UpdateClipCursor(SDL_Window *window)
|
|||
cy = (rect.top + rect.bottom) / 2;
|
||||
|
||||
/* Make an absurdly small clip rect */
|
||||
rect.left = cx - 1;
|
||||
rect.left = cx;
|
||||
rect.right = cx + 1;
|
||||
rect.top = cy - 1;
|
||||
rect.top = cy;
|
||||
rect.bottom = cy + 1;
|
||||
|
||||
if (SDL_memcmp(&rect, &clipped_rect, sizeof(rect)) != 0) {
|
||||
|
|
Loading…
Reference in New Issue