diff options
Diffstat (limited to 'backends/platform/sdl')
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 10 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 547720d435..8224bf547c 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -295,9 +295,15 @@ void OSystem_SDL::delayMillis(uint msecs) { SDL_Delay(msecs); } -void OSystem_SDL::getTimeAndDate(struct tm &t) const { +void OSystem_SDL::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_SDL::getTimerManager() { diff --git a/backends/platform/sdl/sdl.h b/backends/platform/sdl/sdl.h index 82c1e7bf1b..4c31414f90 100644 --- a/backends/platform/sdl/sdl.h +++ b/backends/platform/sdl/sdl.h @@ -183,7 +183,7 @@ public: // Quit virtual void quit(); // overloaded by CE backend - virtual void getTimeAndDate(struct tm &t) const; + virtual void getTimeAndDate(TimeDate &t) const; virtual Common::TimerManager *getTimerManager(); // Mutex handling |