mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-15 22:28:10 +00:00
Implemented OSystem_GP2X::getTimeAndDate (identical to OSystem::getTimeAndDate).
svn-id: r31115
This commit is contained in:
parent
05b159609b
commit
e971282d08
@ -150,6 +150,7 @@ public:
|
||||
// Quit
|
||||
virtual void quit(); // overloaded by CE backend
|
||||
|
||||
virtual void getTimeAndDate(struct tm &t) const;
|
||||
virtual Common::TimerManager *getTimerManager();
|
||||
|
||||
// Mutex handling
|
||||
|
@ -46,6 +46,7 @@
|
||||
#include <limits.h>
|
||||
#include <errno.h>
|
||||
#include <sys/stat.h>
|
||||
#include <time.h>
|
||||
|
||||
// Disable for normal serial logging.
|
||||
#define DUMP_STDOUT
|
||||
@ -185,7 +186,6 @@ void OSystem_GP2X::initBackend() {
|
||||
|
||||
// enable joystick
|
||||
if (joystick_num > -1 && SDL_NumJoysticks() > 0) {
|
||||
//printf("Using joystick: %s\n", SDL_JoystickName(0));
|
||||
_joystick = SDL_JoystickOpen(joystick_num);
|
||||
}
|
||||
|
||||
@ -301,6 +301,11 @@ void OSystem_GP2X::delayMillis(uint msecs) {
|
||||
SDL_Delay(msecs);
|
||||
}
|
||||
|
||||
void OSystem_GP2X::getTimeAndDate(struct tm &t) const {
|
||||
time_t curTime = time(0);
|
||||
t = *localtime(&curTime);
|
||||
}
|
||||
|
||||
Common::TimerManager *OSystem_GP2X::getTimerManager() {
|
||||
assert(_timer);
|
||||
return _timer;
|
||||
|
Loading…
Reference in New Issue
Block a user