From bd2e5cbcd0c602d9cf80c742c4cd77170dfe851e Mon Sep 17 00:00:00 2001 From: Sara Date: Sun, 16 Jul 2023 17:40:55 +0200 Subject: [PATCH] loading a scene now disconnects all input --- src/corelib/scene.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/corelib/scene.c b/src/corelib/scene.c index 61090c2..689fee9 100644 --- a/src/corelib/scene.c +++ b/src/corelib/scene.c @@ -1,6 +1,7 @@ #include "scene.h" #include "ctype.h" +#include "input.h" #include "stdint.h" #include "stddef.h" #include "stdlib.h" @@ -200,6 +201,7 @@ int _validate_scene(FILE* file) { void load_scene(const char* filename) { FILE* file = fopen(filename, "r"); if(_validate_scene(file)) { + input_disconnect_all(); world_clear(); _parse_scene(file); fclose(file); @@ -209,6 +211,7 @@ void load_scene(const char* filename) { void load_scene_additive(const char* filename) { FILE* file = fopen(filename, "r"); if(_validate_scene(file)) { + input_disconnect_all(); _parse_scene(file); fclose(file); }