diff options
-rw-r--r-- | backends/platform/dc/dc.h | 3 | ||||
-rw-r--r-- | backends/platform/dc/dcmain.cpp | 5 |
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() { |