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);
|
return strdup(_gameText);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GameDetecter::detectMain(int argc, char **argv)
|
int GameDetecter::detectMain(int argc, char **argv)
|
||||||
{
|
{
|
||||||
_debugMode = 0; // off by default...
|
_debugMode = 0; // off by default...
|
||||||
|
|
||||||
|
@ -233,34 +233,30 @@ void GameDetecter::detectMain(int argc, char **argv)
|
||||||
#else
|
#else
|
||||||
_midi_driver = MIDI_NULL;
|
_midi_driver = MIDI_NULL;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
parseCommandLine(argc, argv);
|
parseCommandLine(argc, argv);
|
||||||
|
|
||||||
if (_exe_name != NULL) {
|
if (_exe_name==NULL) {
|
||||||
/* No game selection menu */
|
//launcherLoop();
|
||||||
|
//setWindowName(this);
|
||||||
|
warning("No game was specified...");
|
||||||
|
return(-1);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!detectGame()) {
|
if (!detectGame()) {
|
||||||
warning("Game detection failed. Using default settings");
|
warning("Game detection failed. Using default settings");
|
||||||
_features = GF_DEFAULT;
|
_features = GF_DEFAULT;
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
_gameText = "Please choose a game";
|
_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) {
|
if (!_gameDataPath) {
|
||||||
warning("No path was provided. Assuming that data file are in the current directory");
|
warning("No path was provided. Assuming that data file are in the current directory");
|
||||||
_gameDataPath = (char *)malloc(sizeof(char) * 2);
|
_gameDataPath = (char *)malloc(sizeof(char) * 2);
|
||||||
strcpy(_gameDataPath, "");
|
strcpy(_gameDataPath, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
class GameDetecter {
|
class GameDetecter {
|
||||||
public:
|
public:
|
||||||
void detectMain(int argc, char **argv);
|
int detectMain(int argc, char **argv);
|
||||||
void parseCommandLine(int argc, char **argv);
|
void parseCommandLine(int argc, char **argv);
|
||||||
bool detectGame(void);
|
bool detectGame(void);
|
||||||
char *getGameName(void);
|
char *getGameName(void);
|
||||||
|
|
3
sdl.cpp
3
sdl.cpp
|
@ -922,7 +922,8 @@ int main(int argc, char* argv[]) {
|
||||||
long i;
|
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
|
if( detecter._features & GF_AFTER_V7 ) // not final implementation. This is just a test
|
||||||
scumm = new Scumm_v7;
|
scumm = new Scumm_v7;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue