mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
don't react to ALLEGRO_EVENT_DISPLAY_RESIZE if the new size is the same as the old one
This commit is contained in:
parent
199ad64bac
commit
7c89ef74e2
1 changed files with 6 additions and 4 deletions
|
@ -49,14 +49,16 @@ static inline void HandleEvent(struct Game* game, ALLEGRO_EVENT* ev) {
|
|||
break;
|
||||
|
||||
case ALLEGRO_EVENT_DISPLAY_RESIZE:
|
||||
if ((ev->display.width != al_get_display_width(game->display)) || (ev->display.height != al_get_display_height(game->display))) {
|
||||
#ifdef LIBSUPERDERPY_IMGUI
|
||||
ImGui_ImplAllegro5_InvalidateDeviceObjects();
|
||||
ImGui_ImplAllegro5_InvalidateDeviceObjects();
|
||||
#endif
|
||||
al_acknowledge_resize(game->display);
|
||||
al_acknowledge_resize(game->display);
|
||||
#ifdef LIBSUPERDERPY_IMGUI
|
||||
ImGui_ImplAllegro5_CreateDeviceObjects();
|
||||
ImGui_ImplAllegro5_CreateDeviceObjects();
|
||||
#endif
|
||||
SetupViewport(game);
|
||||
SetupViewport(game);
|
||||
}
|
||||
break;
|
||||
|
||||
case ALLEGRO_EVENT_KEY_DOWN:
|
||||
|
|
Loading…
Reference in a new issue