mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
make sure shaders are loaded in-between Load and PostLoad calls + call PostLoad for loading
This commit is contained in:
parent
886034e596
commit
d9dd73bfc8
2 changed files with 6 additions and 2 deletions
|
@ -330,7 +330,6 @@ SYMBOL_EXPORT int libsuperderpy_start(struct Game* game) {
|
|||
|
||||
al_clear_to_color(al_map_rgb(0, 0, 0));
|
||||
|
||||
ReloadShaders(game, false);
|
||||
al_flip_display();
|
||||
|
||||
{
|
||||
|
@ -353,6 +352,10 @@ SYMBOL_EXPORT int libsuperderpy_start(struct Game* game) {
|
|||
|
||||
ReloadShaders(game, false);
|
||||
|
||||
if (game->_priv.loading.gamestate->api->post_load) {
|
||||
(*game->_priv.loading.gamestate->api->post_load)(game, game->_priv.loading.gamestate->data);
|
||||
}
|
||||
|
||||
game->_priv.timestamp = al_get_time();
|
||||
game->_priv.paused = false;
|
||||
|
||||
|
|
|
@ -365,6 +365,8 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
|
||||
al_set_new_bitmap_flags(data.bitmap_flags);
|
||||
|
||||
ReloadShaders(game, false);
|
||||
|
||||
if (tmp->api->post_load) {
|
||||
PrintConsole(game, "[%s] Post-loading...", tmp->name);
|
||||
tmp->api->post_load(game, tmp->data);
|
||||
|
@ -400,7 +402,6 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
}
|
||||
|
||||
if (game->_priv.loading.loaded) {
|
||||
ReloadShaders(game, false);
|
||||
MainloopEvents(game); // consume queued events
|
||||
#ifdef __EMSCRIPTEN__
|
||||
DrawGamestates(game);
|
||||
|
|
Loading…
Reference in a new issue