diff options
author | Max Horn | 2009-10-08 19:41:38 +0000 |
---|---|---|
committer | Max Horn | 2009-10-08 19:41:38 +0000 |
commit | 42120ed626c0d18bc1e1738678dbd1fa96481f04 (patch) | |
tree | 90715ea5e5bb3f3f24547f484b2355194b9cd93c /backends/platform/PalmOS/Src | |
parent | f5ccaf7e29183d6e51456d5994eccfd35ff9a117 (diff) | |
download | scummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.tar.gz scummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.tar.bz2 scummvm-rg350-42120ed626c0d18bc1e1738678dbd1fa96481f04.zip |
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
Diffstat (limited to 'backends/platform/PalmOS/Src')
-rw-r--r-- | backends/platform/PalmOS/Src/be_base.cpp | 10 | ||||
-rw-r--r-- | backends/platform/PalmOS/Src/be_base.h | 2 |
2 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/PalmOS/Src/be_base.cpp b/backends/platform/PalmOS/Src/be_base.cpp index 0355f28501..66dd823df0 100644 --- a/backends/platform/PalmOS/Src/be_base.cpp +++ b/backends/platform/PalmOS/Src/be_base.cpp @@ -125,9 +125,15 @@ void OSystem_PalmBase::initBackend() { OSystem::initBackend(); } -void OSystem_PalmBase::getTimeAndDate(struct tm &t) const { +void OSystem_PalmBase::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; } uint32 OSystem_PalmBase::getMillis() { diff --git a/backends/platform/PalmOS/Src/be_base.h b/backends/platform/PalmOS/Src/be_base.h index 83b2ec2cbd..3f6da2e058 100644 --- a/backends/platform/PalmOS/Src/be_base.h +++ b/backends/platform/PalmOS/Src/be_base.h @@ -239,7 +239,7 @@ public: bool pollEvent(Common::Event &event); - void getTimeAndDate(struct tm &t) const; + void getTimeAndDate(TimeDate &t) const; virtual uint32 getMillis(); virtual void delayMillis(uint msecs); |