about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJune McEnroe <june@causal.agency>2019-03-24 16:21:43 -0400
committerJune McEnroe <june@causal.agency>2019-03-24 16:21:43 -0400
commitf3546f948a66aa505aee770879fc125e855afec8 (patch)
treee6800ab17093423bd8b4ce63a0f30d481722a32c
parentUse Card typedef (diff)
downloadcards-f3546f948a66aa505aee770879fc125e855afec8.tar.gz
cards-f3546f948a66aa505aee770879fc125e855afec8.zip
Use SDL_RenderSetLogicalSize rather than SetScale
Diffstat (limited to '')
-rw-r--r--sol.c13
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;