changeset 61:8d34a12484db

core: game should present the window at the very end
author David Demelier <markand@malikania.fr>
date Wed, 22 Jan 2020 12:12:25 +0100
parents 7266c750b649
children d07acc6ee4d9
files src/core/game.c src/core/map_state.c
diffstat 2 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/core/game.c	Wed Jan 22 12:12:11 2020 +0100
+++ b/src/core/game.c	Wed Jan 22 12:12:25 2020 +0100
@@ -22,6 +22,7 @@
 
 #include "game.h"
 #include "state.h"
+#include "painter.h"
 
 struct game game = {
 	.state = NULL,
@@ -144,6 +145,7 @@
 		game.state->draw();
 
 	draw_actions();
+	painter_present();
 }
 
 void
--- a/src/core/map_state.c	Wed Jan 22 12:12:11 2020 +0100
+++ b/src/core/map_state.c	Wed Jan 22 12:12:25 2020 +0100
@@ -327,7 +327,6 @@
 		map_state_data.player.angle,
 		map_state_data.player.x - map_state_data.view.x,
 		map_state_data.player.y - map_state_data.view.y);
-	painter_present();
 }
 
 struct map_state_data map_state_data;