POSIX: Add #ifdef guards for DATA_PATH.

Thanks to snover for pointing out they should be there.
This commit is contained in:
Alyssa Milburn 2016-08-04 16:19:12 +02:00
parent 266e8e6611
commit 13d0ec9bea

View file

@ -142,6 +142,7 @@ Common::String OSystem_POSIX::getDefaultConfigFileName() {
} }
void OSystem_POSIX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) { void OSystem_POSIX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority) {
#ifdef DATA_PATH
const char *snap = getenv("SNAP"); const char *snap = getenv("SNAP");
if (snap) { if (snap) {
Common::String dataPath = Common::String(snap) + DATA_PATH; Common::String dataPath = Common::String(snap) + DATA_PATH;
@ -152,6 +153,7 @@ void OSystem_POSIX::addSysArchivesToSearchSet(Common::SearchSet &s, int priority
s.add(dataPath, new Common::FSDirectory(dataNode, 4), priority); s.add(dataPath, new Common::FSDirectory(dataNode, 4), priority);
} }
} }
#endif
// For now, we always add the data path, just in case SNAP doesn't make sense. // For now, we always add the data path, just in case SNAP doesn't make sense.
OSystem_SDL::addSysArchivesToSearchSet(s, priority); OSystem_SDL::addSysArchivesToSearchSet(s, priority);