From 42120ed626c0d18bc1e1738678dbd1fa96481f04 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Thu, 8 Oct 2009 19:41:38 +0000 Subject: 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 --- backends/platform/iphone/osys_main.cpp | 10 ++++++++-- backends/platform/iphone/osys_main.h | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'backends/platform/iphone') diff --git a/backends/platform/iphone/osys_main.cpp b/backends/platform/iphone/osys_main.cpp index eb2ecf8769..b151688e4e 100644 --- a/backends/platform/iphone/osys_main.cpp +++ b/backends/platform/iphone/osys_main.cpp @@ -198,9 +198,15 @@ void OSystem_IPHONE::setTimerCallback(TimerProc callback, int interval) { void OSystem_IPHONE::quit() { } -void OSystem_IPHONE::getTimeAndDate(struct tm &t) const { +void OSystem_IPHONE::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::SaveFileManager *OSystem_IPHONE::getSavefileManager() { diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h index c4c1a8b080..c923d0f4e8 100644 --- a/backends/platform/iphone/osys_main.h +++ b/backends/platform/iphone/osys_main.h @@ -169,7 +169,7 @@ public: FilesystemFactory *getFilesystemFactory() { return _fsFactory; } virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0); - virtual void getTimeAndDate(struct tm &t) const; + virtual void getTimeAndDate(TimeDate &t) const; virtual Common::SaveFileManager *getSavefileManager(); virtual Audio::Mixer *getMixer(); -- cgit v1.2.3