all repos — mgba @ 933a6c4f36bb4ebf3eeab126093c798128541fd9

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

933a6c4f36bb4ebf3eeab126093c798128541fd9

parent

7c906e855866d015ae23c35c35066d6838ecec21

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

jump to
M CHANGESCHANGES

@@ -13,6 +13,7 @@ - GBA Memory: Use a dynamically sized mask for ROM memory

- Qt: Remove useless help icons in dialogs - ARM7: Combine shifter-immediate and shifter-register functions to reduce binary size - SDL: Support fullscreen in SDL 1.2 + - 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

@@ -304,7 +304,11 @@ }

#endif 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) {

@@ -313,8 +317,8 @@ }

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