From e13094e7b7e54e169c64ff243a483e5eaf2b0bc2 Mon Sep 17 00:00:00 2001 From: huaqo-games Date: Wed, 15 Oct 2025 20:34:05 +0200 Subject: [PATCH] refactor: game start variables to main loop --- include/app.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/app.h b/include/app.h index 0eca03a..4e999c6 100644 --- a/include/app.h +++ b/include/app.h @@ -26,8 +26,6 @@ typedef struct { void ConfigApp(App* app){ InitConfig(&app->config, "config/config.ini"); app->state.currentView = GetConfigInt(&app->config, "startView"); - app->state.running = true; - app->state.gameStarted = false; app->flags.showFPS = GetConfigInt(&app->config, "showFPS"); app->window.title = GetConfigString(&app->config, "window_title"); app->window.width = GetConfigInt(&app->config, "window_width"); @@ -42,6 +40,10 @@ void InitApp(App *app){ } void UpdateApp(App *app){ + + app->state.running = true; + app->state.gameStarted = false; + while (app->state.running) { switch (app->state.currentView)