Implement OSystem_PSP::getFilesystemFactory() and OSystemPSP::getTimeAndDate()

svn-id: r31195
This commit is contained in:
Joost Peters 2008-03-19 11:07:27 +00:00
parent 74e5ef5c56
commit 2c67073084
3 changed files with 10 additions and 5 deletions

View File

@ -637,6 +637,11 @@ void OSystem_PSP::quit() {
sceKernelExitGame();
}
void OSystem_PSP::getTimeAndDate(struct tm &t) const {
time_t curTime = time(0);
t = *localtime(&curTime);
}
void OSystem_PSP::setWindowCaption(const char *caption) {
}

View File

@ -26,6 +26,8 @@
#include "common/scummsys.h"
#include "common/system.h"
#include "graphics/surface.h"
#include "backends/fs/psp/psp-fs-factory.h"
#include <SDL.h>
@ -135,6 +137,8 @@ public:
Common::SaveFileManager *getSavefileManager() { return _savefile; }
Audio::Mixer *getMixer() { return _mixer; }
Common::TimerManager *getTimerManager() { return _timer; }
FilesystemFactory *getFilesystemFactory() { return &PSPFilesystemFactory::instance(); }
void getTimeAndDate(struct tm &t) const;
virtual void quit();

View File

@ -146,12 +146,10 @@ void OSystem::getTimeAndDate(struct tm &t) const {
#include "backends/fs/palmos/palmos-fs-factory.h"
#elif defined(__PLAYSTATION2__)
#include "backends/fs/ps2/ps2-fs-factory.h"
#elif defined(__PSP__)
#include "backends/fs/psp/psp-fs-factory.h"
#endif
FilesystemFactory *OSystem::getFilesystemFactory() {
#if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32)
#if defined(__amigaos4__) || defined(__DC__) || defined(__SYMBIAN32__) || defined(UNIX) || defined(WIN32) || defined(__PSP__)
// These ports already implement this function, so it should never be called.
return 0;
#elif defined(__DS__)
@ -162,8 +160,6 @@ FilesystemFactory *OSystem::getFilesystemFactory() {
return &PalmOSFilesystemFactory::instance();
#elif defined(__PLAYSTATION2__)
return &Ps2FilesystemFactory::instance();
#elif defined(__PSP__)
return &PSPFilesystemFactory::instance();
#else
#error Unknown and unsupported backend in OSystem::getFilesystemFactory
#endif