From 6702f7efa271f4939bb818232ab2ee5592a75360 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 24 Nov 2012 18:37:16 +0100 Subject: [PATCH] (Mednafen bsnes) SRAM fix --- mednafen/snes/interface.cpp | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/mednafen/snes/interface.cpp b/mednafen/snes/interface.cpp index 862b271b..bdaaca2b 100644 --- a/mednafen/snes/interface.cpp +++ b/mednafen/snes/interface.cpp @@ -351,25 +351,13 @@ static bool SaveMemorySub(bool load, const char *extension, SNES::MappedRAM *mem if(memoryA && memoryA->size() != 0 && memoryA->size() != -1U) { errno = 0; - if(fread(memoryA->data(), memoryA->size(), 1, gp) != memoryA->size()) - { - ErrnoHolder ene(errno); - - MDFN_PrintError(_("Error reading save file \"%s\": %s"), path.c_str(), ene.StrError()); - return(false); - } + fread(memoryA->data(), memoryA->size(), 1, gp); } if(memoryB && memoryB->size() != 0 && memoryB->size() != -1U) { errno = 0; - if(fread(memoryB->data(), memoryB->size(), 1, gp) != memoryB->size()) - { - ErrnoHolder ene(errno); - - MDFN_PrintError(_("Error reading save file \"%s\": %s"), path.c_str(), ene.StrError()); - return(false); - } + fread(memoryB->data(), memoryB->size(), 1, gp); } fclose(gp);