aboutsummaryrefslogtreecommitdiff
path: root/backends/platform
diff options
context:
space:
mode:
Diffstat (limited to 'backends/platform')
-rw-r--r--backends/platform/ps2/ps2time.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/backends/platform/ps2/ps2time.cpp b/backends/platform/ps2/ps2time.cpp
index 2e7741bfed..5bd62b640d 100644
--- a/backends/platform/ps2/ps2time.cpp
+++ b/backends/platform/ps2/ps2time.cpp
@@ -104,10 +104,15 @@ void OSystem_PS2::readRtcTime(void) {
}
extern "C" time_t time(time_t *p) {
+ if (p) *p = (time_t)g_timeSecs;
return (time_t)g_timeSecs;
}
extern "C" struct tm *localtime(const time_t *p) {
+ // FIXME: This function should actually use the value in *p!
+ // But the work needed for that is not necessary -- just implement
+ // OSystem::getTimeAndDate using the code provided here, and
+ // ditch the custom time & localtime methods.
uint32 currentSecs = g_timeSecs + (msecCount - g_lastTimeCheck) / 1000;
if (currentSecs >= SECONDS_PER_DAY) {
buildNewDate(+1);