aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Hamm2002-03-25 00:45:09 +0000
committerVincent Hamm2002-03-25 00:45:09 +0000
commit29e08ae6ed450eb317f01e3b303fcdab436f053c (patch)
treedfca69ee6b35420b7915615bf8d8fa670c421f46
parent92a19c45aef3f0e34dfcc5caf2b7f5e65295d00f (diff)
downloadscummvm-rg350-29e08ae6ed450eb317f01e3b303fcdab436f053c.tar.gz
scummvm-rg350-29e08ae6ed450eb317f01e3b303fcdab436f053c.tar.bz2
scummvm-rg350-29e08ae6ed450eb317f01e3b303fcdab436f053c.zip
Fixed a few things in the launcher
svn-id: r3816
-rw-r--r--gameDetecter.cpp28
-rw-r--r--gameDetecter.h2
-rw-r--r--sdl.cpp3
3 files changed, 15 insertions, 18 deletions
diff --git a/gameDetecter.cpp b/gameDetecter.cpp
index f1771ff629..dc998217fb 100644
--- a/gameDetecter.cpp
+++ b/gameDetecter.cpp
@@ -216,7 +216,7 @@ char *GameDetecter::getGameName() {
return strdup(_gameText);
}
-void GameDetecter::detectMain(int argc, char **argv)
+int GameDetecter::detectMain(int argc, char **argv)
{
_debugMode = 0; // off by default...
@@ -233,34 +233,30 @@ void GameDetecter::detectMain(int argc, char **argv)
#else
_midi_driver = MIDI_NULL;
#endif
+
parseCommandLine(argc, argv);
- if (_exe_name != NULL) {
- /* No game selection menu */
+ if (_exe_name==NULL) {
+ //launcherLoop();
+ //setWindowName(this);
+ warning("No game was specified...");
+ return(-1);
+ }
+
+
if (!detectGame()) {
warning("Game detection failed. Using default settings");
_features = GF_DEFAULT;
- }
} else {
_gameText = "Please choose a game";
}
- /* Init graphics and create a primary virtual screen */
-
- if (_exe_name==NULL) {
- //launcherLoop();
- //setWindowName(this);
- }
-
- if (!detectGame()) {
- warning("Game detection failed. Using default settings");
- _features = GF_DEFAULT;
- }
-
if (!_gameDataPath) {
warning("No path was provided. Assuming that data file are in the current directory");
_gameDataPath = (char *)malloc(sizeof(char) * 2);
strcpy(_gameDataPath, "");
}
+
+ return(0);
}
diff --git a/gameDetecter.h b/gameDetecter.h
index c66a39f443..0441d8e1b7 100644
--- a/gameDetecter.h
+++ b/gameDetecter.h
@@ -1,6 +1,6 @@
class GameDetecter {
public:
- void detectMain(int argc, char **argv);
+ int detectMain(int argc, char **argv);
void parseCommandLine(int argc, char **argv);
bool detectGame(void);
char *getGameName(void);
diff --git a/sdl.cpp b/sdl.cpp
index 23cb9baab8..6ec574b664 100644
--- a/sdl.cpp
+++ b/sdl.cpp
@@ -922,7 +922,8 @@ int main(int argc, char* argv[]) {
long i;
- detecter.detectMain(argc, argv);
+ if(detecter.detectMain(argc, argv))
+ return(-1);
if( detecter._features & GF_AFTER_V7 ) // not final implementation. This is just a test
scumm = new Scumm_v7;