Core: Warn when savedata fails to load from state

This commit is contained in:
Vicki Pfau 2020-06-18 01:31:52 -07:00
parent 2f29082401
commit 3f818f0735
1 changed files with 3 additions and 1 deletions

View File

@ -450,7 +450,9 @@ bool mCoreLoadStateNamed(struct mCore* core, struct VFile* vf, int flags) {
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;