Skip to content

Commit

Permalink
Needs to be square! O.o
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaMoo committed Jun 1, 2017
1 parent 17d8eb1 commit 327e7a5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Core/HLE/sceJpeg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ static int __DecodeJpeg(u32 jpegAddr, int jpegSize, u32 imageAddr) {
u32 *abgr = (u32*)Memory::GetPointer(imageAddr);
int pspWidth;
for (int w = 2; w < 2048; w *= 2) {
if (w >= width) {
if (w >= width && w >= height) {
pspWidth = w;
break;
}
Expand All @@ -151,7 +151,7 @@ static int __DecodeJpeg(u32 jpegAddr, int jpegSize, u32 imageAddr) {
abgr[x] = convertARGBtoABGR(imageBuffer[x]);
}
imageBuffer += width;
abgr += pspWidth; // Smallest value power of 2 fitting width.
abgr += pspWidth; // Smallest value power of 2 fitting width and height(need to be square!)
}
}

Expand Down

0 comments on commit 327e7a5

Please sign in to comment.