Qt: Show a warning when save file can't be opened

This commit is contained in:
Vicki Pfau 2020-06-07 15:52:26 -07:00
parent 35be6c121b
commit ee6bbaf61c
3 changed files with 5 additions and 2 deletions

View File

@ -54,6 +54,7 @@ Misc:
- Qt: Disable Replace ROM option when no game loaded - Qt: Disable Replace ROM option when no game loaded
- Qt: Defer texture updates until frame is drawn (fixes mgba.io/i/1590) - Qt: Defer texture updates until frame is drawn (fixes mgba.io/i/1590)
- Qt: Set icon for Discord Rich Presence - Qt: Set icon for Discord Rich Presence
- Qt: Show a warning when save file can't be opened
0.8.1: (2020-02-16) 0.8.1: (2020-02-16)
Emulation fixes: Emulation fixes:

View File

@ -432,7 +432,7 @@ bool GBALoadROM(struct GBA* gba, struct VFile* vf) {
bool GBALoadSave(struct GBA* gba, struct VFile* sav) { bool GBALoadSave(struct GBA* gba, struct VFile* sav) {
GBASavedataInit(&gba->memory.savedata, sav); GBASavedataInit(&gba->memory.savedata, sav);
return true; return sav;
} }
void GBAYankROM(struct GBA* gba) { void GBAYankROM(struct GBA* gba) {

View File

@ -109,7 +109,9 @@ CoreController* CoreManager::loadGame(VFile* vf, const QString& path, const QStr
} }
bytes = info.dir().canonicalPath().toUtf8(); bytes = info.dir().canonicalPath().toUtf8();
mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData())); mDirectorySetAttachBase(&core->dirs, VDirOpen(bytes.constData()));
mCoreAutoloadSave(core); if (!mCoreAutoloadSave(core)) {
LOG(QT, ERROR) << tr("Failed to open save file. Is the save directory writable?");
}
mCoreAutoloadCheats(core); mCoreAutoloadCheats(core);
CoreController* cc = new CoreController(core); CoreController* cc = new CoreController(core);