[Scummvm-cvs-logs] SF.net SVN: scummvm: [31115] scummvm/trunk/backends/platform/gp2x

djwillis at users.sourceforge.net djwillis at users.sourceforge.net
Wed Mar 12 20:37:21 CET 2008


Revision: 31115
          http://scummvm.svn.sourceforge.net/scummvm/?rev=31115&view=rev
Author:   djwillis
Date:     2008-03-12 12:37:21 -0700 (Wed, 12 Mar 2008)

Log Message:
-----------
Implemented OSystem_GP2X::getTimeAndDate (identical to OSystem::getTimeAndDate).

Modified Paths:
--------------
    scummvm/trunk/backends/platform/gp2x/gp2x-common.h
    scummvm/trunk/backends/platform/gp2x/gp2x.cpp

Modified: scummvm/trunk/backends/platform/gp2x/gp2x-common.h
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2008-03-12 18:42:47 UTC (rev 31114)
+++ scummvm/trunk/backends/platform/gp2x/gp2x-common.h	2008-03-12 19:37:21 UTC (rev 31115)
@@ -150,6 +150,7 @@
 	// Quit
 	virtual void quit(); // overloaded by CE backend
 
+	virtual void getTimeAndDate(struct tm &t) const;
 	virtual Common::TimerManager *getTimerManager();
 
 	// Mutex handling

Modified: scummvm/trunk/backends/platform/gp2x/gp2x.cpp
===================================================================
--- scummvm/trunk/backends/platform/gp2x/gp2x.cpp	2008-03-12 18:42:47 UTC (rev 31114)
+++ scummvm/trunk/backends/platform/gp2x/gp2x.cpp	2008-03-12 19:37:21 UTC (rev 31115)
@@ -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 @@
 
 	// 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 @@
 	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;


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list