diff options
author | Eugene Sandulenko | 2007-12-28 07:43:52 +0000 |
---|---|---|
committer | Eugene Sandulenko | 2007-12-28 07:43:52 +0000 |
commit | ef319ad6745678275a4c5eb159d6d95fdf17649f (patch) | |
tree | 216cba22fab48bcce82cdf12edcd95a74f6afb21 /backends/platform | |
parent | d4d072fe0484918b6caf4571b933a9b374177e5b (diff) | |
download | scummvm-rg350-ef319ad6745678275a4c5eb159d6d95fdf17649f.tar.gz scummvm-rg350-ef319ad6745678275a4c5eb159d6d95fdf17649f.tar.bz2 scummvm-rg350-ef319ad6745678275a4c5eb159d6d95fdf17649f.zip |
Patch #1859448: Add OSystem::getTimeAndDate API
svn-id: r30034
Diffstat (limited to 'backends/platform')
-rw-r--r-- | backends/platform/ps2/ps2time.cpp | 5 |
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); |