diff --git a/src/libsuperderpy.c b/src/libsuperderpy.c index d6f02e2..06c7bc3 100644 --- a/src/libsuperderpy.c +++ b/src/libsuperderpy.c @@ -181,6 +181,8 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char* game->shuttingdown = false; game->restart = false; + game->show_loading_on_launch = false; + return game; } @@ -203,9 +205,8 @@ SYMBOL_EXPORT int libsuperderpy_run(struct Game *game) { struct Gamestate *tmp = game->_priv.gamestates; while (tmp) { - // don't show loading screen on init - // TODO: make it configurable - tmp->showLoading = false; + // don't show loading screen on init if requested + tmp->showLoading = game->show_loading_on_launch; tmp = tmp->next; } diff --git a/src/libsuperderpy.h b/src/libsuperderpy.h index 491ab92..7ace2d2 100644 --- a/src/libsuperderpy.h +++ b/src/libsuperderpy.h @@ -120,6 +120,8 @@ struct Game { bool shuttingdown; /*!< If true then shut down of the game is pending. */ bool restart; /*!< If true then restart of the game is pending. */ + bool show_loading_on_launch; + const char* name; LIBSUPERDERPY_DATA_TYPE *data;