GB Video: Fix deserializing negative LX state
Vicki Pfau vi@endrift.com
Tue, 23 Mar 2021 19:51:03 -0700
2 files changed,
3 insertions(+),
0 deletions(-)
M
CHANGES
→
CHANGES
@@ -88,6 +88,7 @@ - GB: Fix loading model overrides
- GB Serialize: Fix crash when loading pre-0.7 SGB savestates - GB Video: Fix SGB video logs - GB Video: Discard SGB packets in non-SGB mVLs + - GB Video: Fix deserializing negative LX state - GBA: Fix loading multiboot ELF files (fixes mgba.io/i/1949) - GBA: Fix loading subsequent save files (fixes mgba.io/i/2067) - mGUI: Don't attempt to preload files larger than can fit in RAM
M
src/gb/video.c
→
src/gb/video.c
@@ -867,6 +867,8 @@ LOAD_16LE(video->x, 0, &state->video.x);
LOAD_16LE(video->ly, 0, &state->video.ly); LOAD_32LE(video->frameCounter, 0, &state->video.frameCounter); LOAD_32LE(video->dotClock, 0, &state->video.dotCounter); + video->x = (int16_t) video->x; // Ensure proper sign extension--the LOAD_16 is unsigned + video->vramCurrentBank = state->video.vramCurrentBank; GBSerializedVideoFlags flags = state->video.flags;