change max game image dimensions to 640x480 to support screenshots

This commit is contained in:
Daryl Borth 2021-01-28 11:51:53 -07:00
parent 699f35b0f9
commit 5929fe9d26

View File

@ -1049,7 +1049,7 @@ static int MenuGameSelection()
GuiImage preview;
preview.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
preview.SetPosition(175, -8);
u8* imgBuffer = MEM_ALLOC(512 * 512 * 4);
u8* imgBuffer = MEM_ALLOC(640 * 480 * 4);
int previousBrowserIndex = -1;
char imagePath[MAXJOLIET + 1];
@ -1141,7 +1141,7 @@ static int MenuGameSelection()
snprintf(imagePath, MAXJOLIET, "%s%s/%s.png", pathPrefix[GCSettings.LoadMethod], getImageFolder(), browserList[browser.selIndex].displayname);
int width, height;
if(DecodePNGFromFile(imagePath, &width, &height, imgBuffer, 512, 512))
if(DecodePNGFromFile(imagePath, &width, &height, imgBuffer, 640, 480))
{
preview.SetImage(imgBuffer, width, height);
preview.SetScale( MIN(225.0f / width, 235.0f / height) );