From 783ee136d7820f574f59d950b30db3d8addf729e 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 3f519443..1d3dafd2 100644 --- a/sim_video.c +++ b/sim_video.c @@ -1812,10 +1812,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 ();