diff options
author | kcgen <kcgen@users.noreply.github.com> | 2022-10-17 23:44:01 +0300 |
---|---|---|
committer | kcgen <1557255+kcgen@users.noreply.github.com> | 2022-10-18 21:45:12 +0300 |
commit | 889ce1ee99dbfdc1a92a5c9f35c0fa46949dc3f9 (patch) | |
tree | 51498b02917d19b33a6508131f901d561aff8d3f /include | |
parent | e39f8dfa35cc1e5562588532b88468778fb5021b (diff) |
Initialize the window's canvas size during its setup phase
Diffstat (limited to 'include')
-rw-r--r-- | include/sdlmain.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/include/sdlmain.h b/include/sdlmain.h index 06743e873..03f978fba 100644 --- a/include/sdlmain.h +++ b/include/sdlmain.h @@ -135,6 +135,7 @@ struct SDL_Block { bool display_res = false; } full = {}; struct { + // user-configured window size int width = 0; int height = 0; bool resizable = false; @@ -142,6 +143,8 @@ struct SDL_Block { bool adjusted_initial_size = false; int initial_x_pos = -1; int initial_y_pos = -1; + // instantaneous canvas size of the window + SDL_Rect canvas_size = {}; } window = {}; struct { int width = 0; @@ -152,10 +155,6 @@ struct SDL_Block { double dpi_scale = 1.0; bool fullscreen = false; - // Records the canvas size (actual window-size in pixels) prior - // to switching to fullscreen - SDL_Rect canvas_size_before_fullscreen_switch = {}; - // This flag indicates, that we are in the process of switching // between fullscreen or window (as oppososed to changing // rendering size due to rotating screen, emulation state, or |