all repos — mgba @ 3f818f07352bed795b80b6f447d8ae7c2eb82522

mGBA Game Boy Advance Emulator

Core: Warn when savedata fails to load from state
Vicki Pfau vi@endrift.com
Thu, 18 Jun 2020 01:31:52 -0700
commit

3f818f07352bed795b80b6f447d8ae7c2eb82522

parent

2f2908240178cd418acc6e4942ad9b78939b85a5

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

jump to
M src/core/serialize.csrc/core/serialize.c

@@ -450,7 +450,9 @@ }

if (mStateExtdataGet(&extdata, EXTDATA_SAVEDATA, &item)) { mLOG(SAVESTATE, INFO, "Loading savedata"); if (item.data) { - core->savedataRestore(core, item.data, item.size, flags & SAVESTATE_SAVEDATA); + if (!core->savedataRestore(core, item.data, item.size, flags & SAVESTATE_SAVEDATA)) { + mLOG(SAVESTATE, WARN, "Failed to load savedata from savestate"); + } } } struct mCheatDevice* device;