diff options
author | June McEnroe <june@causal.agency> | 2019-03-24 16:21:43 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-03-24 16:21:43 -0400 |
commit | f3546f948a66aa505aee770879fc125e855afec8 (patch) | |
tree | e6800ab17093423bd8b4ce63a0f30d481722a32c | |
parent | Use Card typedef (diff) | |
download | cards-f3546f948a66aa505aee770879fc125e855afec8.tar.gz cards-f3546f948a66aa505aee770879fc125e855afec8.zip |
Use SDL_RenderSetLogicalSize rather than SetScale
Diffstat (limited to '')
-rw-r--r-- | sol.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/sol.c b/sol.c index c0882ac..930eda6 100644 --- a/sol.c +++ b/sol.c @@ -431,19 +431,10 @@ int main(void) { &window, &render ); if (error) err("SDL_CreateWindowAndRenderer"); - SDL_SetWindowTitle(window, "Solitaire"); - int width, height; - SDL_GetRendererOutputSize(render, &width, &height); - if (width > WindowWidth && height > WindowHeight) { - SDL_RenderSetIntegerScale(render, SDL_TRUE); - SDL_RenderSetScale( - render, - (float)width / WindowWidth, - (float)height / WindowHeight - ); - } + SDL_RenderSetIntegerScale(render, SDL_TRUE); + SDL_RenderSetLogicalSize(render, WindowWidth, WindowHeight); for (uint i = 0; i < Cards_Count; ++i) { textures[i] = NULL; |