mirror of
https://github.com/dborth/fceugx.git
synced 2024-12-04 22:34:14 +01:00
change max dimensions back to 640x480, fix bug in png loading
This commit is contained in:
parent
04d1532538
commit
aa2e14bb1c
@ -1049,7 +1049,7 @@ static int MenuGameSelection()
|
||||
GuiImage preview;
|
||||
preview.SetAlignment(ALIGN_CENTRE, ALIGN_MIDDLE);
|
||||
preview.SetPosition(175, -8);
|
||||
u8* imgBuffer = MEM_ALLOC(640 * 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, 640, 512))
|
||||
if(DecodePNGFromFile(imagePath, &width, &height, imgBuffer, 640, 480))
|
||||
{
|
||||
preview.SetImage(imgBuffer, width, height);
|
||||
preview.SetScale( MIN(225.0f / width, 235.0f / height) );
|
||||
|
@ -592,7 +592,7 @@ u8 * DecodePNGFromFile(const char *filepath, int * width, int * height, u8 *dstP
|
||||
PNGUPROP imgProp;
|
||||
u8 *dst = NULL;
|
||||
|
||||
if(PNGU_GetImageProperties(ctx, &imgProp) == PNGU_OK && imgProp.imgWidth <= maxwidth && imgProp.imgHeight < maxheight)
|
||||
if(PNGU_GetImageProperties(ctx, &imgProp) == PNGU_OK && imgProp.imgWidth <= maxwidth && imgProp.imgHeight <= maxheight)
|
||||
dst = PNGU_DecodeTo4x4RGBA8 (ctx, imgProp.imgWidth, imgProp.imgHeight, width, height, dstPtr, maxwidth, maxheight);
|
||||
|
||||
PNGU_ReleaseImageContext (ctx);
|
||||
|
Loading…
Reference in New Issue
Block a user