SDL_Render expose by default the same size as the window
This commit is contained in:
parent
a67b441a10
commit
f0b3078e34
|
@ -1051,6 +1051,11 @@ SDL_CreateRenderer(SDL_Window *window, const char *name, Uint32 flags)
|
|||
SDL_GetWindowSize(renderer->window, &window_w, &window_h);
|
||||
renderer->dpi_scale.x = (float)window_w / output_w;
|
||||
renderer->dpi_scale.y = (float)window_h / output_h;
|
||||
|
||||
/* Virtually expose the same size as the window */
|
||||
if (output_w != window_w || output_h != window_h) {
|
||||
SDL_SetRenderLogicalSize(renderer, window_w, window_h);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue