diff --git a/source/ngc/filebrowser.h b/source/ngc/filebrowser.h index fd7305e..9d3d35c 100644 --- a/source/ngc/filebrowser.h +++ b/source/ngc/filebrowser.h @@ -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 diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index 9881779..9d5d21f 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -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++; diff --git a/source/ngc/menu.cpp b/source/ngc/menu.cpp index b69f067..fbf310c 100644 --- a/source/ngc/menu.cpp +++ b/source/ngc/menu.cpp @@ -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++; } diff --git a/source/ngc/snes9xGX.cpp b/source/ngc/snes9xGX.cpp index d2b1197..a365464 100644 --- a/source/ngc/snes9xGX.cpp +++ b/source/ngc/snes9xGX.cpp @@ -352,7 +352,6 @@ main(int argc, char *argv[]) #endif #ifdef HW_RVL - DI_Close(); DI_Init(); // first #endif