From 77dddef4153688218bec0b50f547622daa18903d Mon Sep 17 00:00:00 2001 From: Aaditya Dhruv Date: Wed, 28 Jan 2026 13:24:36 -0600 Subject: Move input to separate file - Input is handled in a separate thread, its all kind of unsafe right now but will fix later on --- src/engine.c | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/engine.c') diff --git a/src/engine.c b/src/engine.c index 08f4852..84db967 100644 --- a/src/engine.c +++ b/src/engine.c @@ -1,6 +1,7 @@ #include "engine.h" #include "block.h" #include "chunk.h" +#include "input.h" #include "window.h" #include "world.h" #include @@ -65,13 +66,6 @@ void _engine_insert_chunk_ptrs(struct engine* engine, struct chunk* chunk) { void engine_draw(struct engine* engine) { while (engine->game_loop) { - SDL_Event event; - while (SDL_PollEvent(&event)) { - // Quit game - if (event.type == SDL_QUIT) { - engine->game_loop = 0; - } - } glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glClearColor(0.529f, 0.808f, 0.922f, 1.0f); glEnable(GL_DEPTH_TEST); -- cgit