aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--base/engine.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/base/engine.cpp b/base/engine.cpp
index 567def93cd..1445c8d6b2 100644
--- a/base/engine.cpp
+++ b/base/engine.cpp
@@ -47,14 +47,15 @@ Engine::~Engine() {
}
const char *Engine::getSavePath() const {
- const char *dir = NULL;
#ifdef _WIN32_WCE
- dir = _gameDataPath;
+ return _gameDataPath;
#elif defined(__PALM_OS__)
- dir = SCUMMVM_SAVEPATH;
+ return SCUMMVM_SAVEPATH;
#else
+ const char *dir = NULL;
+
#if !defined(MACOS_CARBON)
dir = getenv("SCUMMVM_SAVEPATH");
#endif
@@ -66,9 +67,9 @@ const char *Engine::getSavePath() const {
// If no save path was specified, use no directory prefix
if (dir == NULL)
dir = "";
-#endif
return dir;
+#endif
}
void NORETURN CDECL error(const char *s, ...) {