Libretro: Fix Game Boy savestates and audio
Jeffrey Pfau jeffrey@endrift.com
Fri, 30 Dec 2016 21:12:55 -0800
2 files changed,
5 insertions(+),
4 deletions(-)
M
CHANGES
→
CHANGES
@@ -34,6 +34,7 @@ - GB Memory: Fix HDMA5 value after DMA completes
- GB Video: Hblank IRQs should mask LYC=LY IRQs - GB Audio: Reset envelope timer when reseting sound channel - Libretro: Fix disabling BIOS + - Libretro: Fix Game Boy savestates and audio Misc: - PSP2: Improved controller rumble - GB, GBA: Prevent loading null ROMs
M
src/platform/libretro/libretro.c
→
src/platform/libretro/libretro.c
@@ -146,7 +146,7 @@ info->geometry.base_height = height;
info->geometry.max_width = width; info->geometry.max_height = height; info->geometry.aspect_ratio = width / (double) height; - info->timing.fps = GBA_ARM7TDMI_FREQUENCY / (float) VIDEO_TOTAL_LENGTH; + info->timing.fps = core->frequency(core) / (float) core->frameCycles(core); info->timing.sample_rate = 32768; }@@ -443,14 +443,14 @@ CircleBufferDeinit(&rumbleHistory);
} size_t retro_serialize_size(void) { - return sizeof(struct GBASerializedState); + return core->stateSize(core); } bool retro_serialize(void* data, size_t size) { if (size != retro_serialize_size()) { return false; } - GBASerialize(core->board, data); + core->saveState(core, data); return true; }@@ -458,7 +458,7 @@ bool retro_unserialize(const void* data, size_t size) {
if (size != retro_serialize_size()) { return false; } - GBADeserialize(core->board, data); + core->loadState(core, data); return true; }