diff options
author | ostanton <oliver@stanton.uk.net> | 2025-04-05 12:59:42 +0100 |
---|---|---|
committer | ostanton <oliver@stanton.uk.net> | 2025-04-05 12:59:42 +0100 |
commit | 72580b4f254402647f9420ed07c5d67a9fe75187 (patch) | |
tree | b63f2fea4547e8934afc44c88f8914104e8da9cd | |
parent | b851d1dee56a191b3eabee957af4bb35f0a3e2cb (diff) | |
download | ldjam57-grid.tar |
Resize grid to fit windowgrid
-rw-r--r-- | src/all.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -129,7 +129,7 @@ int main(int argc, char **argv) { "LDJam 57", game->ui.width, game->ui.height, - 0 + SDL_WINDOW_RESIZABLE ); SDL_PropertiesID renderProps = SDL_CreateProperties(); SDL_SetPointerProperty(renderProps, SDL_PROP_RENDERER_CREATE_WINDOW_POINTER, w); @@ -149,6 +149,9 @@ int main(int argc, char **argv) { game->mousex = (int) e.button.x; game->mousey = (int) e.button.y; break; + case SDL_EVENT_WINDOW_RESIZED: + SDL_GetWindowSize(w, &game->ui.width, &game->ui.height); + break; } } |