mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-22 04:01:23 +00:00
DS: Nothing is supposed to use time(), so don't globally include <time.h> -- in particular, no need to fake a time() impl if the only code using it is the backend itself ;)
svn-id: r36012
This commit is contained in:
parent
72702130d9
commit
3e7155981e
@ -38,6 +38,9 @@
|
||||
#include "touchkeyboard.h"
|
||||
#include "backends/fs/ds/ds-fs-factory.h"
|
||||
|
||||
#include <time.h>
|
||||
|
||||
|
||||
OSystem_DS* OSystem_DS::_instance = NULL;
|
||||
|
||||
OSystem_DS::OSystem_DS()
|
||||
@ -545,8 +548,14 @@ void OSystem_DS::delayMillis(uint msecs) {
|
||||
DS::addEventsToQueue();
|
||||
}
|
||||
|
||||
|
||||
void OSystem_DS::getTimeAndDate(struct tm &t) const {
|
||||
time_t curTime = time(0);
|
||||
time_t curTime;
|
||||
#if 0
|
||||
curTime = time(0);
|
||||
#else
|
||||
curTime = 0xABCD1234 + getMillis() / 1000;
|
||||
#endif
|
||||
t = *localtime(&curTime);
|
||||
}
|
||||
|
||||
|
@ -33,24 +33,3 @@ extern "C" time_t __wrap_time(time_t* t) {
|
||||
return OSystem_DS::instance()->getMillis() / 1000;
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
|
||||
time_t DS_time(time_t) {
|
||||
if (OSystem_DS::instance()) {
|
||||
return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
|
||||
} else {
|
||||
return 0xABCD1234;
|
||||
}
|
||||
}
|
||||
|
||||
time_t DS_time(long* t) {
|
||||
if (OSystem_DS::instance()) {
|
||||
if (t) *t = 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
|
||||
return 0xABCD1234 + (OSystem_DS::instance()->getMillis() / 1000);
|
||||
} else {
|
||||
if (t) *t = 0xABCD1234;
|
||||
return 0xABCD1234;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -38,7 +38,6 @@ typedef signed int s32;
|
||||
|
||||
#include "nds/jtypes.h"
|
||||
|
||||
|
||||
// Somebody removed these from scummsys.h, but they're still required, so I'm adding them here
|
||||
// in the hope that they'll stay.
|
||||
#include <stdio.h>
|
||||
@ -47,7 +46,6 @@ typedef signed int s32;
|
||||
#include <stdarg.h>
|
||||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#include <time.h>
|
||||
|
||||
#define double float
|
||||
|
||||
@ -76,8 +74,6 @@ int consolePrintf(const char* s, ...);
|
||||
|
||||
//#define debug(fmt, ...) consolePrintf(fmt, ##__VA_ARGS__)
|
||||
//#define debug(fmt, ...) debug(0, fmt, ##__VA_ARGS__)
|
||||
#define time(t) DS_time(t)
|
||||
//#define memcpy(dest, src, size) DS_memcpy(dest, src, size)
|
||||
|
||||
#define ITCM_DATA __attribute__((section(".itcm")))
|
||||
|
||||
@ -86,11 +82,4 @@ int consolePrintf(const char* s, ...);
|
||||
// a more conventional form of input where the menus can be clicked on.
|
||||
#define LURE_CLICKABLE_MENUS
|
||||
|
||||
//#include "common/array.h"
|
||||
//#include "common/str.h"
|
||||
|
||||
time_t DS_time(time_t* t);
|
||||
time_t DS_time(long* t);
|
||||
void* DS_memcpy(void* s1, void const* s2, size_t n);
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user