From bc0a3cf2c182b7f60c80464309a791377bef5af3 Mon Sep 17 00:00:00 2001 From: David Guillen Fandos Date: Sat, 20 Nov 2021 11:00:42 +0100 Subject: [PATCH] Fix big endian targets state unserialize Converted palette was missing a byte swap after state unserialization This should likely fix WiiU graphics when using rewind and similar techniques that rely on states. --- savestate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/savestate.c b/savestate.c index 61d579d..0402c32 100644 --- a/savestate.c +++ b/savestate.c @@ -95,7 +95,7 @@ bool gba_load_state(const void* src) // Generate converted palette (since it is not saved) for(i = 0; i < 512; i++) { - palette_ram_converted[i] = convert_palette(palette_ram[i]); + palette_ram_converted[i] = convert_palette(eswap16(palette_ram[i])); } video_reload_counters();