mirror of
https://github.com/ekeeke/Genesis-Plus-GX.git
synced 2024-09-10 16:53:15 +02:00
(Xbox 1/360) C89 compatibility fixes
This commit is contained in:
parent
c003038c36
commit
3122ce3323
@ -143,6 +143,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten
|
||||
fread(in, CHUNKSIZE, 1, fd);
|
||||
|
||||
{
|
||||
int left;
|
||||
/* Get file size */
|
||||
fseek(fd, 0, SEEK_END);
|
||||
size = ftell(fd);
|
||||
@ -167,7 +168,7 @@ int load_archive(char *filename, unsigned char *buffer, int maxsize, char *exten
|
||||
}
|
||||
|
||||
/* Read into buffer */
|
||||
int left = size;
|
||||
left = size;
|
||||
while (left > CHUNKSIZE)
|
||||
{
|
||||
fread(buffer, CHUNKSIZE, 1, fd);
|
||||
@ -327,6 +328,7 @@ static int slot_load(int slot)
|
||||
|
||||
/* Device Type */
|
||||
{
|
||||
FILE *fp;
|
||||
/* FAT file */
|
||||
if (slot > 0)
|
||||
{
|
||||
@ -338,7 +340,7 @@ static int slot_load(int slot)
|
||||
}
|
||||
|
||||
/* Open file */
|
||||
FILE *fp = fopen(filename, "rb");
|
||||
fp = fopen(filename, "rb");
|
||||
if (!fp)
|
||||
{
|
||||
fprintf(stderr, "ERROR - Unable to open file.\n");
|
||||
|
Loading…
Reference in New Issue
Block a user