From f566e104f6cfdcee317d45a4c8ce93b33704b3f1 Mon Sep 17 00:00:00 2001 From: Lars Brinkhoff Date: Sun, 30 Apr 2023 14:10:11 +0200 Subject: [PATCH] VIDEO: Check whether SDL_WINDOW_RESIZABLE is present. SDL versions older than 2.0.5 doesn't have this symbol or the SDL_SetWindowResizable function. --- sim_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sim_video.c b/sim_video.c index ec9bdef9..f1e60679 100644 --- a/sim_video.c +++ b/sim_video.c @@ -1814,10 +1814,12 @@ if (!vptr->vid_texture) { vptr->vid_format = SDL_AllocFormat (SDL_PIXELFORMAT_ARGB8888); +#ifdef SDL_WINDOW_RESIZABLE if (vptr->vid_flags & SIM_VID_RESIZABLE) { SDL_SetWindowResizable(vptr->vid_window, SDL_TRUE); SDL_RenderSetIntegerScale(vptr->vid_renderer, SDL_TRUE); } +#endif SDL_StopTextInput ();