From bf64fecf19f87d54af2f2e3b4430318552ac997d Mon Sep 17 00:00:00 2001 From: Sam Lantinga Date: Thu, 12 Oct 2023 00:01:02 -0700 Subject: [PATCH] testffmpeg: allow resizing of the video window --- test/testffmpeg.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/testffmpeg.c b/test/testffmpeg.c index 090aca6b3..6142c1f56 100644 --- a/test/testffmpeg.c +++ b/test/testffmpeg.c @@ -113,6 +113,9 @@ static SDL_bool CreateWindowAndRenderer(Uint32 window_flags, const char *driver) SDL_Log("Created renderer %s\n", info.name); } + /* Use linear scaling in case the user resizes the window */ + SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear"); + #ifdef HAVE_EGL if (useEGL) { const char *extensions = eglQueryString(eglGetCurrentDisplay(), EGL_EXTENSIONS); @@ -834,7 +837,7 @@ int main(int argc, char *argv[]) goto quit; } - window_flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_HIGH_PIXEL_DENSITY; + window_flags = SDL_WINDOW_HIDDEN | SDL_WINDOW_RESIZABLE | SDL_WINDOW_HIGH_PIXEL_DENSITY; #ifdef __APPLE__ window_flags |= SDL_WINDOW_METAL; #elif !defined(__WIN32__)