samsungtv: move DEFAULT_CONFIG_FILE into main sdl code to prevent code duplication
svn-id: r45831
This commit is contained in:
parent
6bc410ba34
commit
a3363e6e1f
3 changed files with 2 additions and 22 deletions
|
@ -43,8 +43,6 @@
|
||||||
|
|
||||||
#if defined(SAMSUNGTV)
|
#if defined(SAMSUNGTV)
|
||||||
|
|
||||||
#define DEFAULT_CONFIG_FILE "/dtv/usb/sda1/.scummvmrc"
|
|
||||||
|
|
||||||
static Uint32 timer_handler(Uint32 interval, void *param) {
|
static Uint32 timer_handler(Uint32 interval, void *param) {
|
||||||
((DefaultTimerManager *)param)->handler();
|
((DefaultTimerManager *)param)->handler();
|
||||||
return interval;
|
return interval;
|
||||||
|
@ -145,23 +143,6 @@ void OSystem_SDL_SamsungTV::addSysArchivesToSearchSet(Common::SearchSet &s, int
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static Common::String getDefaultConfigFileName() {
|
|
||||||
char configFile[MAXPATHLEN];
|
|
||||||
strcpy(configFile, DEFAULT_CONFIG_FILE);
|
|
||||||
return configFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
Common::SeekableReadStream *OSystem_SDL_SamsungTV::createConfigReadStream() {
|
|
||||||
Common::FSNode file(getDefaultConfigFileName());
|
|
||||||
return file.createReadStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
Common::WriteStream *OSystem_SDL_SamsungTV::createConfigWriteStream() {
|
|
||||||
Common::FSNode file(getDefaultConfigFileName());
|
|
||||||
return file.createWriteStream();
|
|
||||||
}
|
|
||||||
|
|
||||||
bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
|
bool OSystem_SDL_SamsungTV::hasFeature(Feature f) {
|
||||||
return
|
return
|
||||||
(f == kFeatureAutoComputeDirtyRects) ||
|
(f == kFeatureAutoComputeDirtyRects) ||
|
||||||
|
|
|
@ -74,9 +74,6 @@ public:
|
||||||
|
|
||||||
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
|
virtual void addSysArchivesToSearchSet(Common::SearchSet &s, int priority = 0);
|
||||||
|
|
||||||
virtual Common::SeekableReadStream *createConfigReadStream();
|
|
||||||
virtual Common::WriteStream *createConfigWriteStream();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
SDL_Surface *_prehwscreen;
|
SDL_Surface *_prehwscreen;
|
||||||
|
|
|
@ -68,6 +68,8 @@
|
||||||
#if defined(UNIX)
|
#if defined(UNIX)
|
||||||
#ifdef MACOSX
|
#ifdef MACOSX
|
||||||
#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
|
#define DEFAULT_CONFIG_FILE "Library/Preferences/ScummVM Preferences"
|
||||||
|
#elif defined(SAMSUNGTV)
|
||||||
|
#define DEFAULT_CONFIG_FILE "/dtv/usb/sda1/.scummvmrc"
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_CONFIG_FILE ".scummvmrc"
|
#define DEFAULT_CONFIG_FILE ".scummvmrc"
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue