GB Video: Fix deserializing negative LX state

This commit is contained in:
Vicki Pfau 2021-03-23 19:51:03 -07:00
parent 44f031d89b
commit f34fa2b6af
2 changed files with 3 additions and 0 deletions

View File

@ -88,6 +88,7 @@ Other fixes:
- 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

View File

@ -867,6 +867,8 @@ void GBVideoDeserialize(struct GBVideo* video, const struct GBSerializedState* s
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;