all repos — mgba @ 0d5b6b84c1588fa7462e4ece460d4a1c15915cfb

mGBA Game Boy Advance Emulator

GBA: Attempting to save a screenshot-style savestate should be allowed without libpng
Jeffrey Pfau jeffrey@endrift.com
Sun, 30 Aug 2015 18:22:36 -0700
commit

0d5b6b84c1588fa7462e4ece460d4a1c15915cfb

parent

78b3cedb2bd7b308a4163070fd6dda4682e28c1c

2 files changed, 6 insertions(+), 1 deletions(-)

jump to
M CHANGESCHANGES

@@ -8,6 +8,7 @@ - GBA Video: Start on the scanline BIOS finishes on if no BIOS is loaded

- 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:
M src/gba/serialize.csrc/gba/serialize.c

@@ -300,7 +300,11 @@ return success;

} 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 @@ }

GBASerialize(gba, state); vf->unmap(vf, state, sizeof(struct GBASerializedState)); return true; - } #ifdef USE_PNG + } else { return _savePNGState(gba, vf); }