Fixed a few things in the launcher
svn-id: r3816
This commit is contained in:
parent
92a19c45ae
commit
29e08ae6ed
3 changed files with 15 additions and 18 deletions
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
3
sdl.cpp
3
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue