wayland: Round fractional scale values when viewports aren't supported

main
Frank Praznik 2024-04-10 15:58:42 -04:00
parent b2239cb7ba
commit 38c4f29c29
1 changed files with 5 additions and 0 deletions

View File

@ -1193,6 +1193,11 @@ static void Wayland_HandlePreferredScaleChanged(SDL_WindowData *window_data, flo
return;
}
/* Round the scale factor if viewports aren't available. */
if (!window_data->viewport) {
factor = SDL_ceilf(factor);
}
if (!FloatEqual(factor, old_factor)) {
window_data->windowed_scale_factor = factor;