mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
make sure to redraw the gamestates after a resize
Also affects compositor toggling
This commit is contained in:
parent
c7ebc51f16
commit
5a6e212de1
3 changed files with 7 additions and 2 deletions
|
@ -178,6 +178,9 @@ SYMBOL_INTERNAL void ResizeGamestates(struct Game* game) {
|
|||
game->_priv.loading.gamestate->fb = al_create_sub_bitmap(al_get_backbuffer(game->display), game->clip_rect.x, game->clip_rect.y, game->clip_rect.w, game->clip_rect.h);
|
||||
}
|
||||
}
|
||||
if (game->_priv.started) {
|
||||
DrawGamestates(game);
|
||||
}
|
||||
}
|
||||
|
||||
SYMBOL_INTERNAL int SetupAudio(struct Game* game) {
|
||||
|
|
|
@ -87,8 +87,10 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
game->_priv.garbage = NULL;
|
||||
game->_priv.timelines = NULL;
|
||||
game->_priv.shaders = NULL;
|
||||
game->_priv.gamestates = NULL;
|
||||
|
||||
game->_priv.paused = false;
|
||||
game->_priv.started = false;
|
||||
|
||||
game->_priv.texture_sync = false;
|
||||
game->_priv.texture_sync_cond = al_create_cond();
|
||||
|
@ -291,8 +293,6 @@ SYMBOL_EXPORT struct Game* libsuperderpy_init(int argc, char** argv, const char*
|
|||
|
||||
al_add_new_bitmap_flag(ALLEGRO_MIN_LINEAR | ALLEGRO_MAG_LINEAR);
|
||||
|
||||
game->_priv.gamestates = NULL;
|
||||
|
||||
al_init_user_event_source(&(game->event_source));
|
||||
|
||||
game->_priv.event_queue = al_create_event_queue();
|
||||
|
@ -384,6 +384,7 @@ SYMBOL_EXPORT int libsuperderpy_start(struct Game* game) {
|
|||
|
||||
game->_priv.timestamp = al_get_time();
|
||||
game->_priv.paused = false;
|
||||
game->_priv.started = true;
|
||||
|
||||
#ifdef LIBSUPERDERPY_IMGUI
|
||||
igCreateContext(NULL);
|
||||
|
|
|
@ -229,6 +229,7 @@ struct Game {
|
|||
double timestamp;
|
||||
|
||||
bool paused;
|
||||
bool started;
|
||||
|
||||
volatile bool texture_sync;
|
||||
ALLEGRO_MUTEX* texture_sync_mutex;
|
||||
|
|
Loading…
Reference in a new issue