loading a scene now disconnects all input

pull/15/head
Sara 2023-07-16 17:40:55 +02:00
parent 25feb8f95f
commit bd2e5cbcd0
1 changed files with 3 additions and 0 deletions

View File

@ -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);
}