From a31b3f27037cc75b733a34871cfadc9707055b16 Mon Sep 17 00:00:00 2001 From: Jaakko Keränen Date: Mon, 8 Mar 2021 18:14:51 +0200 Subject: Scale images for display Resize images down to the maximum texture size or the screen size, whichever is smaller. IssueID #167 --- src/ui/window.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/ui/window.c') diff --git a/src/ui/window.c b/src/ui/window.c index 038d72af..3c362986 100644 --- a/src/ui/window.c +++ b/src/ui/window.c @@ -1397,11 +1397,18 @@ SDL_Renderer *renderer_Window(const iWindow *d) { return d->render; } +iInt2 maxTextureSize_Window(const iWindow *d) { + SDL_RendererInfo info; + SDL_GetRendererInfo(d->render, &info); + return init_I2(info.max_texture_width, info.max_texture_height); +} + iBool isFullscreen_Window(const iWindow *d) { return snap_Window(d) == fullscreen_WindowSnap; } static void invalidate_Window_(iWindow *d) { + iUnused(d); resetFonts_Text(); postCommand_App("theme.changed"); /* forces UI invalidation */ } -- cgit v1.2.3