diff options
Diffstat (limited to 'backends/platform/gp2x')
-rw-r--r-- | backends/platform/gp2x/gp2x-common.h | 2 | ||||
-rw-r--r-- | backends/platform/gp2x/gp2x.cpp | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/gp2x/gp2x-common.h b/backends/platform/gp2x/gp2x-common.h index c8bbd93de0..6878673024 100644 --- a/backends/platform/gp2x/gp2x-common.h +++ b/backends/platform/gp2x/gp2x-common.h @@ -138,7 +138,7 @@ public: // Quit void quit(); - void getTimeAndDate(struct tm &t) const; + void getTimeAndDate(TimeDate &t) const; virtual Common::TimerManager *getTimerManager(); // Mutex handling diff --git a/backends/platform/gp2x/gp2x.cpp b/backends/platform/gp2x/gp2x.cpp index 21a047b345..e15281dbf4 100644 --- a/backends/platform/gp2x/gp2x.cpp +++ b/backends/platform/gp2x/gp2x.cpp @@ -301,9 +301,15 @@ void OSystem_GP2X::delayMillis(uint msecs) { SDL_Delay(msecs); } -void OSystem_GP2X::getTimeAndDate(struct tm &t) const { +void OSystem_GP2X::getTimeAndDate(TimeDate &td) const { time_t curTime = time(0); - 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; } Common::TimerManager *OSystem_GP2X::getTimerManager() { |