fix incorrect FAT file loading

This commit is contained in:
dborth 2008-10-03 05:26:01 +00:00
parent 830ef92806
commit 1c92d45bc1
4 changed files with 9 additions and 9 deletions

View File

@ -234,11 +234,12 @@ LoadBufferFromFAT (char *filepath, bool silent)
return 0; return 0;
} }
/*** This is really nice, just load the file and decode it ***/ // Just load the file up
while ((read = fread (savebuffer + boffset, 1, 1024, handle)) > 0) fseek(handle, 0, SEEK_END); // go to end of file
{ size = ftell(handle); // get filesize
boffset += read; fseek(handle, 0, SEEK_SET); // go to start of file
} fread (sbuffer, 1, size, handle);
fclose (handle);
fclose (handle); fclose (handle);

View File

@ -345,8 +345,7 @@ int FileSelector (int method)
break; break;
case METHOD_SMB: case METHOD_SMB:
ARAM_ROMSIZE = ARAM_ROMSIZE = LoadSMBFile ();
LoadSMBFile ();
break; break;
} }

View File

@ -28,7 +28,7 @@
#include "snapshot.h" #include "snapshot.h"
#include "srtc.h" #include "srtc.h"
#include "Snes9xGX.h" #include "snes9xGX.h"
#include "images/saveicon.h" #include "images/saveicon.h"
#include "freeze.h" #include "freeze.h"
#include "filesel.h" #include "filesel.h"

View File

@ -25,7 +25,7 @@
#include "video.h" #include "video.h"
#include "menudraw.h" #include "menudraw.h"
#include "filesel.h" #include "filesel.h"
#include "Snes9xGX.h" #include "snes9xGX.h"
bool networkInit = false; bool networkInit = false;
bool networkShareInit = false; bool networkShareInit = false;