diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index 06c7bc3..719d5d1 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -28,9 +28,6 @@ #include #include #include -#include -#include -#include #ifdef ALLEGRO_MACOSX #include #include @@ -270,7 +267,7 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) { tmp->pending_unload = false; game->_priv.current_gamestate = tmp; (*tmp->api->Gamestate_Unload)(game, tmp->data); - al_start_timer(game->_priv.timer); + al_resume_timer(game->_priv.timer); } if (tmp->pending_load) { al_stop_timer(game->_priv.timer); @@ -328,7 +325,7 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) { tmp->loaded = true; tmp->pending_load = false; } - al_start_timer(game->_priv.timer); + al_resume_timer(game->_priv.timer); } tmp=tmp->next; @@ -343,7 +340,7 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) { al_stop_timer(game->_priv.timer); game->_priv.current_gamestate = tmp; (*tmp->api->Gamestate_Start)(game, tmp->data); - al_start_timer(game->_priv.timer); + al_resume_timer(game->_priv.timer); tmp->started = true; tmp->pending_start = false; } diff --git a/src/libsuperderpy.h b/src/libsuperderpy.h index 7ace2d2..0c1bd31 100644 --- a/src/libsuperderpy.h +++ b/src/libsuperderpy.h @@ -27,6 +27,9 @@ #include #include #include +#include +#include +#include #include "gamestate.h" #include "config.h" #include "timeline.h" diff --git a/src/timeline.c b/src/timeline.c index 04590f7..bbde5e5 100644 --- a/src/timeline.c +++ b/src/timeline.c @@ -124,7 +124,7 @@ SYMBOL_INTERNAL void PauseTimers(struct Timeline* timeline, bool pause) { if (timeline->queue->timer) { if (pause) { al_stop_timer(timeline->queue->timer); - } else if (!timeline->queue->active) al_start_timer(timeline->queue->timer); + } else if (!timeline->queue->active) al_resume_timer(timeline->queue->timer); } } struct TM_Action* tmp = timeline->background; @@ -132,7 +132,7 @@ SYMBOL_INTERNAL void PauseTimers(struct Timeline* timeline, bool pause) { if (tmp->timer) { if (pause) { al_stop_timer(tmp->timer); - } else if (!tmp->active) al_start_timer(tmp->timer); + } else if (!tmp->active) al_resume_timer(tmp->timer); } tmp = tmp->next; }