GBA: Attempting to save a screenshot-style savestate should be allowed without libpng

This commit is contained in:
Jeffrey Pfau 2015-08-30 18:22:36 -07:00
parent 78b3cedb2b
commit 0d5b6b84c1
2 changed files with 6 additions and 1 deletions

View File

@ -8,6 +8,7 @@ Bugfixes:
- GBA: Deinit savegame when unloading a ROM
Misc:
- Qt: Remove useless help icons in dialogs
- GBA: Attempting to save a screenshot-style savestate should be allowed without libpng
0.3.0: (2015-08-16)
Features:

View File

@ -300,7 +300,11 @@ bool GBALoadState(struct GBAThread* threadContext, struct VDir* dir, int slot) {
}
bool GBASaveStateNamed(struct GBA* gba, struct VFile* vf, bool screenshot) {
#ifdef USE_PNG
if (!screenshot) {
#else
UNUSED(screenshot);
#endif
vf->truncate(vf, sizeof(struct GBASerializedState));
struct GBASerializedState* state = vf->map(vf, sizeof(struct GBASerializedState), MAP_WRITE);
if (!state) {
@ -309,8 +313,8 @@ bool GBASaveStateNamed(struct GBA* gba, struct VFile* vf, bool screenshot) {
GBASerialize(gba, state);
vf->unmap(vf, state, sizeof(struct GBASerializedState));
return true;
}
#ifdef USE_PNG
}
else {
return _savePNGState(gba, vf);
}