diff options
Diffstat (limited to 'backends/platform/dc')
-rw-r--r-- | backends/platform/dc/dc.h | 2 | ||||
-rw-r--r-- | backends/platform/dc/dcmain.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h index f5d200968e..45d9aa99c2 100644 --- a/backends/platform/dc/dc.h +++ b/backends/platform/dc/dc.h @@ -123,7 +123,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys void delayMillis(uint msecs); // Get the current time and date. Correspond to time()+localtime(). - void getTimeAndDate(struct tm &t) const; + void getTimeAndDate(TimeDate &t) const; // Get the next event. // Returns true if an event was retrieved. diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp index 795504d243..078c6266a4 100644 --- a/backends/platform/dc/dcmain.cpp +++ b/backends/platform/dc/dcmain.cpp @@ -193,10 +193,16 @@ bool OSystem_Dreamcast::getFeatureState(Feature f) } } -void OSystem_Dreamcast::getTimeAndDate(struct tm &t) const { +void OSystem_Dreamcast::getTimeAndDate(TimeDate &td) const { time_t curTime; time(&curTime); - t = *localtime(&curTime); + struct tm t = *localtime(&curTime); + td.tm_sec = t.tm_sec; + td.tm_min = t.tm_min; + td.tm_hour = t.tm_hour; + td.tm_mday = t.tm_mday; + td.tm_mon = t.tm_mon; + td.tm_year = t.tm_year; } void DCHardware::dc_init_hardware() |