mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-11-01 00:15:14 +01:00
change time handling, remove DI_Close()
This commit is contained in:
parent
c7aa8f2bd8
commit
9d3f522588
@ -32,7 +32,7 @@ typedef struct
|
||||
{
|
||||
u64 offset; // DVD offset
|
||||
unsigned int length; // file length
|
||||
tm mtime; // file modified time
|
||||
time_t mtime; // file modified time
|
||||
char isdir; // 0 - file, 1 - directory
|
||||
char filename[MAXJOLIET + 1]; // full filename
|
||||
char displayname[MAXDISPLAY + 1]; // name for browser display
|
||||
|
@ -277,7 +277,6 @@ ParseDirectory(int method)
|
||||
char filename[MAXPATHLEN];
|
||||
char tmpname[MAXPATHLEN];
|
||||
struct stat filestat;
|
||||
struct tm * timeinfo;
|
||||
char msg[128];
|
||||
int retry = 1;
|
||||
bool mounted = false;
|
||||
@ -352,8 +351,7 @@ ParseDirectory(int method)
|
||||
}
|
||||
|
||||
browserList[entryNum].length = filestat.st_size;
|
||||
timeinfo = localtime (&filestat.st_mtime);
|
||||
memcpy(&browserList[entryNum].mtime, timeinfo, sizeof(tm));
|
||||
browserList[entryNum].mtime = filestat.st_mtime;
|
||||
browserList[entryNum].isdir = (filestat.st_mode & _IFDIR) == 0 ? 0 : 1; // flag this as a dir
|
||||
|
||||
entryNum++;
|
||||
|
@ -1489,8 +1489,9 @@ static int MenuGameSaves(int action)
|
||||
saves.previewImg[j] = new GuiImageData(savebuffer);
|
||||
FreeSaveBuffer();
|
||||
}
|
||||
strftime(saves.date[j], 20, "%a %b %d", &browserList[j].mtime);
|
||||
strftime(saves.time[j], 10, "%I:%M %p", &browserList[j].mtime);
|
||||
struct tm * timeinfo = localtime(&browserList[j].mtime);
|
||||
strftime(saves.date[j], 20, "%a %b %d", timeinfo);
|
||||
strftime(saves.time[j], 10, "%I:%M %p", timeinfo);
|
||||
}
|
||||
j++;
|
||||
}
|
||||
|
@ -352,7 +352,6 @@ main(int argc, char *argv[])
|
||||
#endif
|
||||
|
||||
#ifdef HW_RVL
|
||||
DI_Close();
|
||||
DI_Init(); // first
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user