diff --git a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/LibGambatte.cs b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/LibGambatte.cs index 96f667dd86..c5835ce4e7 100644 --- a/BizHawk.Emulation/Consoles/Nintendo/Gameboy/LibGambatte.cs +++ b/BizHawk.Emulation/Consoles/Nintendo/Gameboy/LibGambatte.cs @@ -241,10 +241,10 @@ namespace BizHawk.Emulation.Consoles.GB public static extern int gambatte_savesavedatalength(IntPtr core); /// - /// Saves emulator state to the state to a byte array + /// Saves emulator state to a byte array /// /// opaque state pointer - /// 160x144 RGB32 (native endian) video frame buffer or 0. Used for saving a thumbnail. + /// 160x144 RGB32 (native endian) video frame buffer or 0. Used for saving a thumbnail. NOT USED ANYMORE /// distance in number of pixels (not bytes) from the start of one line to the next in videoBuf. /// private savestate data returned by the core /// the length of the data in bytes @@ -260,7 +260,7 @@ namespace BizHawk.Emulation.Consoles.GB public static extern void gambatte_savestate_destroy(IntPtr data); /// - /// Loads emulator state from the byte array + /// Loads emulator state from a byte array /// /// opaque state pointer /// savestate data diff --git a/BizHawk.MultiClient/output/dll/libgambatte.dll b/BizHawk.MultiClient/output/dll/libgambatte.dll index 86475202c6..45515017f2 100644 Binary files a/BizHawk.MultiClient/output/dll/libgambatte.dll and b/BizHawk.MultiClient/output/dll/libgambatte.dll differ diff --git a/libgambatte/src/statesaver.cpp b/libgambatte/src/statesaver.cpp index 26ab47d6e8..1640b82428 100644 --- a/libgambatte/src/statesaver.cpp +++ b/libgambatte/src/statesaver.cpp @@ -418,9 +418,11 @@ bool StateSaver::saveState(const SaveState &state, if (file.fail()) return false; - { static const char ver[] = { 0, 1 }; file.write(ver, sizeof(ver)); } - - writeSnapShot(file, videoBuf, pitch); + //{ static const char ver[] = { 0, 1 }; file.write(ver, sizeof(ver)); } + // bump version as the screenshot is being removed + { static const char ver[] = { 0, 2 }; file.write(ver, sizeof(ver)); } + + //writeSnapShot(file, videoBuf, pitch); for (SaverList::const_iterator it = list.begin(); it != list.end(); ++it) { file.write(it->label, it->labelsize); @@ -436,8 +438,15 @@ bool StateSaver::loadState(SaveState &state, std::istream &file) { if (file.fail() || file.get() != 0) return false; - file.ignore(); - file.ignore(get24(file)); + int minor = file.get(); + if (minor == 1) { // skip over screenshot + file.ignore(); + file.ignore(get24(file)); + } + else if (minor == 2) { // no screenshot + } + else + return false; const Array labelbuf(list.maxLabelsize()); const Saver labelbufSaver = { labelbuf, 0, 0, list.maxLabelsize() };