Do not center on resize

This commit is contained in:
Devine Lu Linvega 2023-04-26 12:04:44 -07:00
parent 0da70d6bd1
commit ce0cc5a352
1 changed files with 1 additions and 1 deletions

View File

@ -169,7 +169,7 @@ set_window_size(SDL_Window *window, int w, int h)
SDL_GetWindowPosition(window, &win.x, &win.y);
SDL_GetWindowSize(window, &win_old.x, &win_old.y);
if(w == win_old.x && h == win_old.y) return;
SDL_SetWindowPosition(window, (win.x + win_old.x / 2) - w / 2, (win.y + win_old.y / 2) - h / 2);
/* SDL_SetWindowPosition(window, (win.x + win_old.x / 2) - w / 2, (win.y + win_old.y / 2) - h / 2); */
SDL_SetWindowSize(window, w, h);
}