From d2b35aeb49a67ad1d09065c2f8361966ac88321c Mon Sep 17 00:00:00 2001
From: Sylvain <[EMAIL REDACTED]>
Date: Tue, 14 Mar 2023 08:22:31 +0100
Subject: [PATCH] Fix build: SDL_CreateWindow doesn't take position anymore
---
glfont.c | 5 +----
testapp.c | 2 +-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/glfont.c b/glfont.c
index 3cdf2af..5416068 100644
--- a/glfont.c
+++ b/glfont.c
@@ -308,10 +308,7 @@ int main(int argc, char *argv[])
}
/* Set a 640x480 video mode */
- window = SDL_CreateWindow("glfont",
- SDL_WINDOWPOS_UNDEFINED,
- SDL_WINDOWPOS_UNDEFINED,
- WIDTH, HEIGHT, SDL_WINDOW_OPENGL);
+ window = SDL_CreateWindow("glfont", WIDTH, HEIGHT, SDL_WINDOW_OPENGL);
if (window == NULL) {
fprintf(stderr, "Couldn't create window: %s\n", SDL_GetError());
cleanup(2);
diff --git a/testapp.c b/testapp.c
index c3b81b5..d48ed89 100644
--- a/testapp.c
+++ b/testapp.c
@@ -605,7 +605,7 @@ int main(void)
quit("SDL_ttf init failed");
}
- window = SDL_CreateWindow("", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, windoww, windowh, 0);
+ window = SDL_CreateWindow("", windoww, windowh, 0);
if (window == NULL) {
quit("SDL windowdow setup failed");
}