aboutsummaryrefslogtreecommitdiff
path: root/common/gameDetector.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/gameDetector.cpp')
-rw-r--r--common/gameDetector.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/common/gameDetector.cpp b/common/gameDetector.cpp
index 581767c58d..237dbf663f 100644
--- a/common/gameDetector.cpp
+++ b/common/gameDetector.cpp
@@ -29,6 +29,9 @@
#include "common/config-file.h"
+extern uint16 _debugLevel;
+
+
#define CHECK_OPTION() if ((current_option != NULL) || (*s != '\0')) goto ShowHelpAndExit
#define HANDLE_OPTION() if ((*s == '\0') && (current_option == NULL)) goto ShowHelpAndExit; \
if ((*s != '\0') && (current_option != NULL)) goto ShowHelpAndExit; \
@@ -450,14 +453,14 @@ bool GameDetector::detectGame()
return true;
}
-char *GameDetector::getGameName()
+const char *GameDetector::getGameName()
{
if (_gameText == NULL) {
char buf[256];
sprintf(buf, "Unknown game: \"%s\"", _exe_name);
- return strdup(buf);
+ _gameText = strdup(buf);
}
- return strdup(_gameText);
+ return _gameText;
}
int GameDetector::detectMain(int argc, char **argv)