diff options
-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; } } |