From 826960abfc555fe322e2beddf7525590f2f4efc0 Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Sat, 31 Jan 2026 21:06:44 -0600 Subject: Move window size to a external configuration file --- src/window.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/window.c') diff --git a/src/window.c b/src/window.c index e3faff7..894a42b 100644 --- a/src/window.c +++ b/src/window.c @@ -1,11 +1,12 @@ #include "window.h" #include "glad/glad.h" +#include "config.h" #include int window_init(struct window* window) { SDL_Init(SDL_INIT_VIDEO); // This will call SDL_GL_LoadLibrary so you don't need glad to do anything - window->window = SDL_CreateWindow("Junkcraft", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 800, 600, SDL_WINDOW_OPENGL); + window->window = SDL_CreateWindow("Junkcraft", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, SCREEN_WIDTH, SCREEN_HEIGHT, SDL_WINDOW_OPENGL); SDL_GLContext* ctx = SDL_GL_CreateContext(window->window); // Let GLAD use the SDL GetProcAddress loader instead of using its own -- cgit