mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
fix incorrect FAT file loading
This commit is contained in:
parent
830ef92806
commit
1c92d45bc1
@ -234,11 +234,12 @@ LoadBufferFromFAT (char *filepath, bool silent)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/*** This is really nice, just load the file and decode it ***/
|
||||
while ((read = fread (savebuffer + boffset, 1, 1024, handle)) > 0)
|
||||
{
|
||||
boffset += read;
|
||||
}
|
||||
// Just load the file up
|
||||
fseek(handle, 0, SEEK_END); // go to end of file
|
||||
size = ftell(handle); // get filesize
|
||||
fseek(handle, 0, SEEK_SET); // go to start of file
|
||||
fread (sbuffer, 1, size, handle);
|
||||
fclose (handle);
|
||||
|
||||
fclose (handle);
|
||||
|
||||
|
@ -345,8 +345,7 @@ int FileSelector (int method)
|
||||
break;
|
||||
|
||||
case METHOD_SMB:
|
||||
ARAM_ROMSIZE =
|
||||
LoadSMBFile ();
|
||||
ARAM_ROMSIZE = LoadSMBFile ();
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -28,7 +28,7 @@
|
||||
#include "snapshot.h"
|
||||
#include "srtc.h"
|
||||
|
||||
#include "Snes9xGX.h"
|
||||
#include "snes9xGX.h"
|
||||
#include "images/saveicon.h"
|
||||
#include "freeze.h"
|
||||
#include "filesel.h"
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include "video.h"
|
||||
#include "menudraw.h"
|
||||
#include "filesel.h"
|
||||
#include "Snes9xGX.h"
|
||||
#include "snes9xGX.h"
|
||||
|
||||
bool networkInit = false;
|
||||
bool networkShareInit = false;
|
||||
|
Loading…
Reference in New Issue
Block a user