From 30b940b9fd3fdbc0c75e99113142a71dc30baac3 Mon Sep 17 00:00:00 2001 From: Alug Date: Wed, 4 Jun 2025 23:03:03 +0200 Subject: [PATCH] set MAXVIDWIDTH and MAXVIDHEIGHT to 8192 should accomidate absolutely everything --- src/m_misc.c | 4 ++-- src/screen.h | 8 ++------ 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/m_misc.c b/src/m_misc.c index 402a1b669..9b63d0b00 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -1060,7 +1060,7 @@ static boolean M_SetupaPNG(png_const_charp filename, png_bytep pal) png_init_io(apng_ptr, apng_FILE); #ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_set_user_limits(apng_ptr, MAXPNGWIDTH, MAXPNGHEIGHT); + png_set_user_limits(apng_ptr, MAXVIDWIDTH, MAXVIDHEIGHT); #endif //png_set_filter(apng_ptr, 0, PNG_ALL_FILTERS); @@ -1375,7 +1375,7 @@ boolean M_SavePNG(const char *filename, void *data, int width, int height, const png_init_io(png_ptr, png_FILE); #ifdef PNG_SET_USER_LIMITS_SUPPORTED - png_set_user_limits(png_ptr, MAXPNGWIDTH, MAXPNGHEIGHT); + png_set_user_limits(png_ptr, MAXVIDWIDTH, MAXVIDHEIGHT); #endif //png_set_filter(png_ptr, 0, PNG_ALL_FILTERS); diff --git a/src/screen.h b/src/screen.h index e339e3adc..d78bbf8c5 100644 --- a/src/screen.h +++ b/src/screen.h @@ -39,15 +39,11 @@ // we try to re-allocate a minimum of buffers for stability of the memory, // so all the small-enough tables based on screen size, are allocated once // and for all at the maximum size. -#define MAXVIDWIDTH 5120 // don't set this too high because actually -#define MAXVIDHEIGHT 2880 // lots of tables are allocated with the MAX size. +#define MAXVIDWIDTH 8192 // don't set this too high because actually +#define MAXVIDHEIGHT 8192 // lots of tables are allocated with the MAX size. #define BASEVIDWIDTH 320 // NEVER CHANGE THIS! This is the original #define BASEVIDHEIGHT 200 // resolution of the graphics. -// max res for png capture; just here to prevent some crashes on very high resolutions; tho you should never go this high cause ogl allocs certain things with MAXVIDWIDTH and MAXVIDHEIGHT too Zzz... -#define MAXPNGWIDTH 7680 -#define MAXPNGHEIGHT 4320 - // global video state typedef struct viddef_s {