summaryrefslogtreecommitdiffstats
path: root/src/state.h
diff options
context:
space:
mode:
authorgramanas <anastasis.gramm2@gmail.com>2024-05-21 13:07:00 +0300
committergramanas <anastasis.gramm2@gmail.com>2024-05-21 13:07:00 +0300
commita6eefcc1d2dd2479b44dbd0bb3732e8568725277 (patch)
tree5c9045977cd7c47064dd4061250f9e8546b0ece8 /src/state.h
parent477455bcaa2f038452b35ec7727b6f24c4ec774f (diff)
downloadcgame-a6eefcc1d2dd2479b44dbd0bb3732e8568725277.tar.gz
cgame-a6eefcc1d2dd2479b44dbd0bb3732e8568725277.tar.bz2
cgame-a6eefcc1d2dd2479b44dbd0bb3732e8568725277.zip
Handle resize in all cases
Diffstat (limited to 'src/state.h')
-rw-r--r--src/state.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/state.h b/src/state.h
index 17be1c0..6feb9d1 100644
--- a/src/state.h
+++ b/src/state.h
@@ -59,7 +59,8 @@ typedef struct state {
float x;
int zoom;
- SDL_Window* sdl_window;
+ SDL_Window *sdl_window;
+ int sdl_window_resized;
VkInstance vk_instance;
VkDebugUtilsMessengerEXT vk_debug_messenger;
@@ -131,6 +132,8 @@ init_state(state_t * s)
s->rotate = 0;
s->mouse_pressed = 0;
+ s->sdl_window_resized = 0;
+
s->window_w = 800;
s->window_h = 600;
s->cell_w = 10;