mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
gamestates: mark gamestate as started before launching Gamestate_Start
This change allows to stop the current gamestate from Gamestate_Start.
This commit is contained in:
parent
3b6f79de29
commit
26843776a2
1 changed files with 2 additions and 2 deletions
|
@ -344,10 +344,10 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) {
|
|||
PrintConsole(game, "Starting gamestate \"%s\"...", tmp->name);
|
||||
al_stop_timer(game->_priv.timer);
|
||||
game->_priv.current_gamestate = tmp;
|
||||
(*tmp->api->Gamestate_Start)(game, tmp->data);
|
||||
al_resume_timer(game->_priv.timer);
|
||||
tmp->started = true;
|
||||
tmp->pending_start = false;
|
||||
(*tmp->api->Gamestate_Start)(game, tmp->data);
|
||||
al_resume_timer(game->_priv.timer);
|
||||
}
|
||||
|
||||
if ((tmp->started) || (tmp->pending_start) || (tmp->pending_load)) gameActive = true;
|
||||
|
|
Loading…
Reference in a new issue