mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-19 19:57:59 +00:00
Allow './wesnoth -t starting_dir' to work again.
Added comment that the current way is a bit ambiguous.
This commit is contained in:
parent
4b9582afaf
commit
0365ccb0a4
@ -250,7 +250,10 @@ game_controller::game_controller(int argc, char** argv)
|
||||
break; //parse the rest of the arguments when we set up the game
|
||||
} else if(val == "--test" || val == "-t") {
|
||||
test_mode_ = true;
|
||||
if(arg_ + 1 != argc_ && argv_[arg_ + 1][0] != '-') {
|
||||
// If we have -t foo it's ambiguous whether it foo is the parameter
|
||||
// for Wesnoth or the start directory so we assume it's the starting
|
||||
// directory.
|
||||
if(arg_ + 2 < argc_ && argv_[arg_ + 1][0] != '-') {
|
||||
++arg_;
|
||||
test_scenario_ = argv_[arg_];
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user