From d7989c591801222c74671186c58393fedee07d28 Mon Sep 17 00:00:00 2001 From: Quinn Date: Thu, 26 Jun 2025 10:54:52 +0200 Subject: [PATCH] fix: wasn't initialising the window properly --- src/io/window.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io/window.c b/src/io/window.c index c92d233..464368f 100644 --- a/src/io/window.c +++ b/src/io/window.c @@ -23,8 +23,8 @@ static void window_init(struct gamedata const* gdat) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0) fatal(ERROR_SDL_INIT, "SDL could not initialize! SDL Error: %s", SDL_GetError()); - SDL_Window* const window = SDL_CreateWindow("tetris clone", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN); - if (window == NULL) + win = SDL_CreateWindow("tetris clone", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_SHOWN); + if (win == NULL) fatal(ERROR_SDL_RENDERING_INIT, "Window failed to be created! SDL Error: %s", SDL_GetError()); render_init(win, gdat);