aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc
diff options
context:
space:
mode:
authorMax Horn2009-10-08 19:41:38 +0000
committerMax Horn2009-10-08 19:41:38 +0000
commit42120ed626c0d18bc1e1738678dbd1fa96481f04 (patch)
tree90715ea5e5bb3f3f24547f484b2355194b9cd93c /backends/platform/dc
parentf5ccaf7e29183d6e51456d5994eccfd35ff9a117 (diff)
downloadscummvm-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/dc')
-rw-r--r--backends/platform/dc/dc.h2
-rw-r--r--backends/platform/dc/dcmain.cpp10
2 files changed, 9 insertions, 3 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index f5d200968e..45d9aa99c2 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -123,7 +123,7 @@ class OSystem_Dreamcast : private DCHardware, public BaseBackend, public Filesys
void delayMillis(uint msecs);
// Get the current time and date. Correspond to time()+localtime().
- void getTimeAndDate(struct tm &t) const;
+ void getTimeAndDate(TimeDate &t) const;
// Get the next event.
// Returns true if an event was retrieved.
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index 795504d243..078c6266a4 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -193,10 +193,16 @@ bool OSystem_Dreamcast::getFeatureState(Feature f)
}
}
-void OSystem_Dreamcast::getTimeAndDate(struct tm &t) const {
+void OSystem_Dreamcast::getTimeAndDate(TimeDate &td) const {
time_t curTime;
time(&curTime);
- 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;
}
void DCHardware::dc_init_hardware()