Introduce a new struct TimeDate, replacing struct tm in client code. May lead to compilation issues in ports, which should be trivial to fix, though

svn-id: r44793
This commit is contained in:
Max Horn 2009-10-08 19:41:38 +00:00
parent f5ccaf7e29
commit 42120ed626
33 changed files with 134 additions and 75 deletions

View file

@ -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() {