diff --git a/src/m_misc.c b/src/m_misc.c index d20ada5d5..c489208fb 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -998,7 +998,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, MAXVIDWIDTH, MAXVIDHEIGHT); + png_set_user_limits(apng_ptr, MAXPNGWIDTH, MAXPNGHEIGHT); #endif //png_set_filter(apng_ptr, 0, PNG_ALL_FILTERS); @@ -1307,7 +1307,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, MAXVIDWIDTH, MAXVIDHEIGHT); + png_set_user_limits(png_ptr, MAXPNGWIDTH, MAXPNGHEIGHT); #endif //png_set_filter(png_ptr, 0, PNG_ALL_FILTERS); diff --git a/src/screen.h b/src/screen.h index 478890c49..f57ceb31b 100644 --- a/src/screen.h +++ b/src/screen.h @@ -39,11 +39,15 @@ // 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 3840 // don't set this too high because actually -#define MAXVIDHEIGHT 2160 // lots of tables are allocated with the MAX size. +#define MAXVIDWIDTH 2560 // don't set this too high because actually +#define MAXVIDHEIGHT 1440 // 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; seperated it so both MAXVID values can be lower +#define MAXPNGWIDTH 3840 +#define MAXPNGHEIGHT 2160 + // global video state typedef struct viddef_s {