mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2025-02-01 02:56:43 +01:00
add more drawing (and sleeping in emscripten) to improve responsiveness around loading
This commit is contained in:
parent
f07b075052
commit
d55fbebe4d
1 changed files with 9 additions and 0 deletions
|
@ -303,6 +303,9 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
DrawGamestates(game);
|
||||
DrawConsole(game);
|
||||
al_flip_display();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_sleep(0);
|
||||
#endif
|
||||
}
|
||||
#ifndef LIBSUPERDERPY_SINGLE_THREAD
|
||||
al_run_detached_thread(GamestateLoadingThread, &data);
|
||||
|
@ -337,6 +340,9 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
}
|
||||
#else
|
||||
GamestateLoadingThread(&data);
|
||||
DrawGamestates(game);
|
||||
DrawConsole(game);
|
||||
al_flip_display();
|
||||
#ifdef __EMSCRIPTEN__
|
||||
emscripten_sleep(0);
|
||||
#endif
|
||||
|
@ -373,6 +379,9 @@ static inline bool MainloopTick(struct Game* game) {
|
|||
ReloadShaders(game, false);
|
||||
MainloopEvents(game); // consume queued events
|
||||
#ifdef __EMSCRIPTEN__
|
||||
DrawGamestates(game);
|
||||
DrawConsole(game);
|
||||
al_flip_display();
|
||||
emscripten_sleep(0);
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue