all repos — mgba @ 573920cae492e56e19db412fecf29890ba53c421

mGBA Game Boy Advance Emulator

GBA Video: Fix palette deserialization on big endian
Jeffrey Pfau jeffrey@endrift.com
Mon, 19 Sep 2016 10:20:37 -0700
commit

573920cae492e56e19db412fecf29890ba53c421

parent

4647473b745bbaa138be0858c50761c9e24505fc

1 files changed, 3 insertions(+), 1 deletions(-)

jump to
M src/gba/renderers/video-software.csrc/gba/renderers/video-software.c

@@ -93,7 +93,9 @@ softwareRenderer->target2Obj = 0;

softwareRenderer->target2Bd = 0; softwareRenderer->blendEffect = BLEND_NONE; for (i = 0; i < 1024; i += 2) { - GBAVideoSoftwareRendererWritePalette(renderer, i, softwareRenderer->d.palette[i >> 1]); + uint16_t entry; + LOAD_16(entry, i, softwareRenderer->d.palette); + GBAVideoSoftwareRendererWritePalette(renderer, i, entry); } _updatePalettes(softwareRenderer);