diff --git a/builds/genplus_cube.dol b/builds/genplus_cube.dol index 1a2db72..0fe70eb 100644 Binary files a/builds/genplus_cube.dol and b/builds/genplus_cube.dol differ diff --git a/builds/genplus_wii.dol b/builds/genplus_wii.dol index caf9e3c..038bf82 100644 Binary files a/builds/genplus_wii.dol and b/builds/genplus_wii.dol differ diff --git a/gx/fileio/file_slot.c b/gx/fileio/file_slot.c index ffa25fb..f12ff56 100644 --- a/gx/fileio/file_slot.c +++ b/gx/fileio/file_slot.c @@ -3,7 +3,7 @@ * * FAT and Memory Card SRAM/State slots managment * - * Copyright Eke-Eke (2008-2014), based on original code from Softdev (2006) + * Copyright Eke-Eke (2008-2021), based on original code from Softdev (2006) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: @@ -288,11 +288,11 @@ void slot_autodetect(int slot, int device, t_slot *ptr) if (fp) { /* Retrieve date & close */ - struct stat filestat; - stat(filename, &filestat); + struct stat filestat; + stat(filename, &filestat); struct tm *timeinfo = localtime(&filestat.st_mtime); ptr->year = 1900 + timeinfo->tm_year; - ptr->month = timeinfo->tm_mon; + ptr->month = timeinfo->tm_mon + 1; ptr->day = timeinfo->tm_mday; ptr->hour = timeinfo->tm_hour; ptr->min = timeinfo->tm_min; @@ -326,9 +326,9 @@ void slot_autodetect(int slot, int device, t_slot *ptr) card_stat CardStatus; CARD_GetStatus(device, CardFile.filenum, &CardStatus); time_t rawtime = CardStatus.time; - struct tm *timeinfo = localtime(&rawtime); + struct tm *timeinfo = localtime(&rawtime); ptr->year = 1900 + timeinfo->tm_year; - ptr->month = timeinfo->tm_mon; + ptr->month = timeinfo->tm_mon + 1; ptr->day = timeinfo->tm_mday; ptr->hour = timeinfo->tm_hour; ptr->min = timeinfo->tm_min; diff --git a/gx/fileio/file_slot.h b/gx/fileio/file_slot.h index 41f8251..aa2b29f 100644 --- a/gx/fileio/file_slot.h +++ b/gx/fileio/file_slot.h @@ -3,7 +3,7 @@ * * FAT and Memory Card SRAM/Savestate files managment * - * Copyright Eke-Eke (2008-2014), based on original code from Softdev (2006) + * Copyright Eke-Eke (2008-2021), based on original code from Softdev (2006) * * Redistribution and use of this code or any derivative works are permitted * provided that the following conditions are met: