From f649ae34faedee52adc7244157e71e6b549d5ce3 Mon Sep 17 00:00:00 2001 From: Aaron Kling Date: Mon, 25 Sep 2017 20:00:22 -0500 Subject: [PATCH] Fix savestates --- Core/SaveState.cpp | 5 ----- Core/SaveState.h | 5 +++++ libretro/libretro.cpp | 8 -------- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/Core/SaveState.cpp b/Core/SaveState.cpp index 4b5a4a5426cb..4ff1d96c072e 100644 --- a/Core/SaveState.cpp +++ b/Core/SaveState.cpp @@ -48,11 +48,6 @@ namespace SaveState { - struct SaveStart - { - void DoState(PointerWrap &p); - }; - enum OperationType { SAVESTATE_SAVE, diff --git a/Core/SaveState.h b/Core/SaveState.h index a4719103afc1..42ecba3e83af 100644 --- a/Core/SaveState.h +++ b/Core/SaveState.h @@ -23,6 +23,11 @@ namespace SaveState { + struct SaveStart + { + void DoState(PointerWrap &p); + }; + typedef std::function Callback; static const int NUM_SLOTS = 5; diff --git a/libretro/libretro.cpp b/libretro/libretro.cpp index 89ca7895c93a..c1fd8623598f 100644 --- a/libretro/libretro.cpp +++ b/libretro/libretro.cpp @@ -1298,7 +1298,6 @@ size_t retro_serialize_size(void) bool retro_serialize(void *data, size_t size) { -#if 0 (void)size; SaveState::SaveStart state; @@ -1316,20 +1315,13 @@ bool retro_serialize(void *data, size_t size) return false; else return CChunkFileReader::SavePtr((u8 *) data, state) == CChunkFileReader::ERROR_NONE; -#else - return false; -#endif } bool retro_unserialize(const void *data, size_t size) { -#if 0 (void)size; SaveState::SaveStart state; return CChunkFileReader::LoadPtr((u8 *) data, state) == CChunkFileReader::ERROR_NONE; -#else - return false; -#endif } void *retro_get_memory_data(unsigned id)