Fixed a few things in the launcher

svn-id: r3816
This commit is contained in:
Vincent Hamm 2002-03-25 00:45:09 +00:00
parent 92a19c45ae
commit 29e08ae6ed
3 changed files with 15 additions and 18 deletions

View file

@ -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);
}

View file

@ -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);

View file

@ -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;