diff options
author | Kostas Nakos | 2007-12-30 17:15:11 +0000 |
---|---|---|
committer | Kostas Nakos | 2007-12-30 17:15:11 +0000 |
commit | 22cfa5660645f3310ec9d8902dd1b9e432302cdf (patch) | |
tree | 40b22c57e1cbdc58002d14fc03cf22f0f1540c95 /backends/platform/wince/missing | |
parent | b9a5e9ea0eae3cf61525361ebbdfac279a8f9361 (diff) | |
download | scummvm-rg350-22cfa5660645f3310ec9d8902dd1b9e432302cdf.tar.gz scummvm-rg350-22cfa5660645f3310ec9d8902dd1b9e432302cdf.tar.bz2 scummvm-rg350-22cfa5660645f3310ec9d8902dd1b9e432302cdf.zip |
implement new gettimeanddate method - fixes bug 1834822 WINCE: Save games have incorrect time & date
svn-id: r30083
Diffstat (limited to 'backends/platform/wince/missing')
-rw-r--r-- | backends/platform/wince/missing/missing.cpp | 43 |
1 files changed, 0 insertions, 43 deletions
diff --git a/backends/platform/wince/missing/missing.cpp b/backends/platform/wince/missing/missing.cpp index 76faf7ea8c..1eb10c5355 100644 --- a/backends/platform/wince/missing/missing.cpp +++ b/backends/platform/wince/missing/missing.cpp @@ -89,42 +89,6 @@ int stat(const char *fname, struct stat *ss) return 0; } -/* Limited implementation of time.h. time_t formula is possibly incorrect. */ -EXT_C time_t time(time_t* res) -{ - time_t t; - SYSTEMTIME st; - GetLocalTime(&st); - - t = (time_t)(((((((st.wYear-1970)*12+st.wMonth)*31+st.wDay)*7+st.wDayOfWeek)*24+st.wHour)*60+st.wMinute)*60+st.wSecond); - - if (res) - *res = t; - return t; -} - -EXT_C struct tm* localtime(time_t* timer) -{ - static struct tm tmLocalTime; - unsigned long rem = *timer; - - tmLocalTime.tm_sec = (short)(rem % 60); - rem /= 60; - tmLocalTime.tm_min = (short)(rem % 60); - rem /= 60; - tmLocalTime.tm_hour = (short)(rem % 24); - rem /= 24; - tmLocalTime.tm_mday = (short)(rem % 7); - rem /= 7; - tmLocalTime.tm_mday = (short)(rem % 31); - rem /= 31; - tmLocalTime.tm_mon = (short)(rem % 12); - rem /= 12; - tmLocalTime.tm_year = (short)(rem+1970); - - return &tmLocalTime; -} - char cwd[MAX_PATH+1] = ""; EXT_C char *getcwd(char *buffer, int maxlen) { @@ -408,13 +372,6 @@ char *strdup(const char *strSource) } /* Very limited implementation of sys/time.h */ -void gettimeofday(struct timeval* tp, void* dummy) -{ - DWORD dt = GetTickCount(); - tp->tv_sec = dt/1000; - tp->tv_usec = dt*1000; -} - void usleep(long usec) { long msec = usec/1000; |