From 81f878ec410d2b690fd1543bee35bce8f14eba06 Mon Sep 17 00:00:00 2001 From: leiradel Date: Sat, 21 Oct 2017 19:36:20 +0100 Subject: [PATCH] Fixed retro_get_memory_data/size --- libretro.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libretro.cpp b/libretro.cpp index 75ac97f..013eed5 100644 --- a/libretro.cpp +++ b/libretro.cpp @@ -925,13 +925,17 @@ bool retro_unserialize(const void *data, size_t size) return MDFNSS_LoadSM(&st, 0, 0); } -void *retro_get_memory_data(unsigned) +void *retro_get_memory_data(unsigned type) { + if (lynxie && type == RETRO_MEMORY_SYSTEM_RAM) + return lynxie->GetRamPointer(); return NULL; } -size_t retro_get_memory_size(unsigned) +size_t retro_get_memory_size(unsigned type) { + if (type == RETRO_MEMORY_SYSTEM_RAM) + return 1024 * 64; return 0; }