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
|
u64 offset; // DVD offset
|
||||||
unsigned int length; // file length
|
unsigned int length; // file length
|
||||||
tm mtime; // file modified time
|
time_t mtime; // file modified time
|
||||||
char isdir; // 0 - file, 1 - directory
|
char isdir; // 0 - file, 1 - directory
|
||||||
char filename[MAXJOLIET + 1]; // full filename
|
char filename[MAXJOLIET + 1]; // full filename
|
||||||
char displayname[MAXDISPLAY + 1]; // name for browser display
|
char displayname[MAXDISPLAY + 1]; // name for browser display
|
||||||
|
@ -277,7 +277,6 @@ ParseDirectory(int method)
|
|||||||
char filename[MAXPATHLEN];
|
char filename[MAXPATHLEN];
|
||||||
char tmpname[MAXPATHLEN];
|
char tmpname[MAXPATHLEN];
|
||||||
struct stat filestat;
|
struct stat filestat;
|
||||||
struct tm * timeinfo;
|
|
||||||
char msg[128];
|
char msg[128];
|
||||||
int retry = 1;
|
int retry = 1;
|
||||||
bool mounted = false;
|
bool mounted = false;
|
||||||
@ -352,8 +351,7 @@ ParseDirectory(int method)
|
|||||||
}
|
}
|
||||||
|
|
||||||
browserList[entryNum].length = filestat.st_size;
|
browserList[entryNum].length = filestat.st_size;
|
||||||
timeinfo = localtime (&filestat.st_mtime);
|
browserList[entryNum].mtime = filestat.st_mtime;
|
||||||
memcpy(&browserList[entryNum].mtime, timeinfo, sizeof(tm));
|
|
||||||
browserList[entryNum].isdir = (filestat.st_mode & _IFDIR) == 0 ? 0 : 1; // flag this as a dir
|
browserList[entryNum].isdir = (filestat.st_mode & _IFDIR) == 0 ? 0 : 1; // flag this as a dir
|
||||||
|
|
||||||
entryNum++;
|
entryNum++;
|
||||||
|
@ -1489,8 +1489,9 @@ static int MenuGameSaves(int action)
|
|||||||
saves.previewImg[j] = new GuiImageData(savebuffer);
|
saves.previewImg[j] = new GuiImageData(savebuffer);
|
||||||
FreeSaveBuffer();
|
FreeSaveBuffer();
|
||||||
}
|
}
|
||||||
strftime(saves.date[j], 20, "%a %b %d", &browserList[j].mtime);
|
struct tm * timeinfo = localtime(&browserList[j].mtime);
|
||||||
strftime(saves.time[j], 10, "%I:%M %p", &browserList[j].mtime);
|
strftime(saves.date[j], 20, "%a %b %d", timeinfo);
|
||||||
|
strftime(saves.time[j], 10, "%I:%M %p", timeinfo);
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
@ -352,7 +352,6 @@ main(int argc, char *argv[])
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
DI_Close();
|
|
||||||
DI_Init(); // first
|
DI_Init(); // first
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user