Common: Fix conversion of 4444 to BGRA.

This was affecting tests emitting screenshots in 4444 as well as Direct3D
backends.
This commit is contained in:
Unknown W. Brackets 2022-01-23 19:22:32 -08:00
parent 5a6bf8b435
commit b4eab72015
2 changed files with 3 additions and 4 deletions

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);

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;