mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2026-10-01 14:59:13 +00:00
[android] fix blue tint on DBZ by using proper swizzle per format (#3367)
just another missing swizzle after translation... heh Signed-off-by: lizzie [email protected] Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/3367 Reviewed-by: MaranBr <[email protected]> Reviewed-by: DraVee <[email protected]> Co-authored-by: lizzie <[email protected]> Co-committed-by: lizzie <[email protected]>
This commit is contained in:
1 parent
338ea4e9d5
commit
6afe209b60
1 file changed
+11
-4
@@ -1018,10 +1018,17 @@ void Vic::WriteABGR(const OutputSurfaceConfig& output_surface_config, VideoPixel
|
||||
for (size_t y = 0; y < surface_height; ++y) {
|
||||
auto const src = y * surface_stride, dst = y * out_luma_stride;
|
||||
for (size_t x = 0; x < surface_width; ++x) {
|
||||
out[dst + x * 4 + 0] = u8(inp[src + x].r >> 2);
|
||||
out[dst + x * 4 + 1] = u8(inp[src + x].g >> 2);
|
||||
out[dst + x * 4 + 2] = u8(inp[src + x].b >> 2);
|
||||
out[dst + x * 4 + 3] = u8(inp[src + x].a >> 2);
|
||||
if(format == VideoPixelFormat::A8R8G8B8) {
|
||||
out[dst + x * 4 + 0] = u8(inp[src + x].b >> 2);
|
||||
out[dst + x * 4 + 1] = u8(inp[src + x].g >> 2);
|
||||
out[dst + x * 4 + 2] = u8(inp[src + x].r >> 2);
|
||||
out[dst + x * 4 + 3] = u8(inp[src + x].a >> 2);
|
||||
} else {
|
||||
out[dst + x * 4 + 0] = u8(inp[src + x].r >> 2);
|
||||
out[dst + x * 4 + 1] = u8(inp[src + x].g >> 2);
|
||||
out[dst + x * 4 + 2] = u8(inp[src + x].b >> 2);
|
||||
out[dst + x * 4 + 3] = u8(inp[src + x].a >> 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user