From a9c318dd7859ed6034e509d9a04aabc29e9108a4 Mon Sep 17 00:00:00 2001 From: Sebastian Krzyszkowiak Date: Fri, 20 Apr 2018 23:54:32 +0200 Subject: [PATCH] loading: call Gamestate_Logic --- src/libsuperderpy.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index cffc131..74eacd5 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -401,12 +401,16 @@ SYMBOL_INTERNAL void libsuperderpy_mainloop(void* g) { #ifndef LIBSUPERDERPY_SINGLE_THREAD al_run_detached_thread(GamestateLoadingThread, &data); + double time = al_get_time(); while (game->_priv.loading.inProgress) { DrawGamestates(game); al_set_target_backbuffer(game->display); + double delta = al_get_time() - time; if (tmp->showLoading) { + (*game->_priv.loading.gamestate->api->Gamestate_Logic)(game, game->_priv.loading.gamestate->data, delta); (*game->_priv.loading.gamestate->api->Gamestate_Draw)(game, game->_priv.loading.gamestate->data); } + time += delta; DrawConsole(game); al_flip_display(); }