Merge pull request #15342 from unknownbrackets/conv4444

Common: Fix conversion of 4444 to BGRA
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2022-01-24 08:17:06 +01:00
commit 23b76aa155
2 files changed
+3 -4

No files matched your search

+1 -2
View File
@@ -504,8 +504,7 @@ void ConvertABGR4444ToRGBA8888(u32 *dst32, const u16 *src, u32 numPixels) {
}
}
void ConvertRGBA4444ToBGRA8888(u32 *dst32, const u16 *src, u32 numPixels) {
u8 *dst = (u8 *)dst32;
void ConvertRGBA4444ToBGRA8888(u32 *dst, const u16 *src, u32 numPixels) {
for (u32 x = 0; x < numPixels; x++) {
u16 c = src[x];
u32 r = Convert4To8(c & 0x000f);
+2 -2
View File
@@ -1989,9 +1989,9 @@ static u32 sceIoDevctl(const char *name, int cmd, u32 argAddr, int argLen, u32 o
case 0x20: // EMULATOR_DEVCTL__EMIT_SCREENSHOT
{
PSPPointer<u8> topaddr;
u32 linesize, pixelFormat;
u32 linesize;
__DisplayGetFramebuf(&topaddr, &linesize, &pixelFormat, 0);
__DisplayGetFramebuf(&topaddr, &linesize, nullptr, 0);
// TODO: Convert based on pixel format / mode / something?
host->SendDebugScreenshot(topaddr, linesize, 272);
return 0;