aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/dc
diff options
context:
space:
mode:
authorMarcus Comstedt2008-03-01 22:12:52 +0000
committerMarcus Comstedt2008-03-01 22:12:52 +0000
commitd5e09de48c09de714bcd916fe9c6b3d2522ccbc6 (patch)
treef201d0d34f2ac943eee46e7963c8904ba833cb9c /backends/platform/dc
parent2db83c69e1244dbafffa1d4dcb06cb4256ba1753 (diff)
downloadscummvm-rg350-d5e09de48c09de714bcd916fe9c6b3d2522ccbc6.tar.gz
scummvm-rg350-d5e09de48c09de714bcd916fe9c6b3d2522ccbc6.tar.bz2
scummvm-rg350-d5e09de48c09de714bcd916fe9c6b3d2522ccbc6.zip
Added getTimeAndDate() implementation.
svn-id: r31027
Diffstat (limited to 'backends/platform/dc')
-rw-r--r--backends/platform/dc/dc.h3
-rw-r--r--backends/platform/dc/dcmain.cpp5
2 files changed, 8 insertions, 0 deletions
diff --git a/backends/platform/dc/dc.h b/backends/platform/dc/dc.h
index 6a7d8c5f16..b7494a77bc 100644
--- a/backends/platform/dc/dc.h
+++ b/backends/platform/dc/dc.h
@@ -116,6 +116,9 @@ class OSystem_Dreamcast : public OSystem, public FilesystemFactory {
// Delay for a specified amount of milliseconds
void delayMillis(uint msecs);
+ // Get the current time and date. Correspond to time()+localtime().
+ void getTimeAndDate(struct tm &t) const;
+
// Get the next event.
// Returns true if an event was retrieved.
bool pollEvent(Common::Event &event);
diff --git a/backends/platform/dc/dcmain.cpp b/backends/platform/dc/dcmain.cpp
index e21fd762c9..913bc9948e 100644
--- a/backends/platform/dc/dcmain.cpp
+++ b/backends/platform/dc/dcmain.cpp
@@ -190,6 +190,11 @@ bool OSystem_Dreamcast::getFeatureState(Feature f)
}
}
+void OSystem_Dreamcast::getTimeAndDate(struct tm &t) const {
+ time_t curTime;
+ time(&curTime);
+ t = *localtime(&curTime);
+}
void dc_init_hardware()
{