Fixed --log=file/terminal (the stdout/err files were opened
before the command line flag was tested, so the behaviour depended on the setting in the previous runs, which were saved). git-svn-id: svn+ssh://svn.code.sf.net/p/supertuxkart/code/main/branches/physics@10249 178a84e3-b1eb-0310-8ba1-8eac791a3b58
This commit is contained in:
parent
06a96ed356
commit
0c5125522d
20
src/main.cpp
20
src/main.cpp
@ -456,6 +456,15 @@ int handleCmdLinePreliminary(int argc, char **argv)
|
||||
{
|
||||
UserConfigParams::m_verbosity |= UserConfigParams::LOG_MISC;
|
||||
}
|
||||
else if( !strcmp(argv[i], "--log=terminal"))
|
||||
{
|
||||
UserConfigParams::m_log_errors=false;
|
||||
}
|
||||
else if( !strcmp(argv[i], "--log=file"))
|
||||
{
|
||||
UserConfigParams::m_log_errors=true;
|
||||
}
|
||||
|
||||
else if ( !strcmp(argv[i], "--debug=all") )
|
||||
{
|
||||
UserConfigParams::m_verbosity |= UserConfigParams::LOG_ALL;
|
||||
@ -863,14 +872,7 @@ int handleCmdLine(int argc, char **argv)
|
||||
race_manager->setNumLaps(atoi(argv[i+1]));
|
||||
i++;
|
||||
}
|
||||
else if( !strcmp(argv[i], "--log=terminal"))
|
||||
{
|
||||
UserConfigParams::m_log_errors=false;
|
||||
}
|
||||
else if( !strcmp(argv[i], "--log=file"))
|
||||
{
|
||||
UserConfigParams::m_log_errors=true;
|
||||
} else if( sscanf(argv[i], "--profile-laps=%d", &n)==1)
|
||||
else if( sscanf(argv[i], "--profile-laps=%d", &n)==1)
|
||||
{
|
||||
printf("Profiling %d laps\n",n);
|
||||
UserConfigParams::m_no_start_screen = true;
|
||||
@ -927,6 +929,8 @@ int handleCmdLine(int argc, char **argv)
|
||||
else if( !strcmp(argv[i], "--debug=flyable") ) {}
|
||||
else if( !strcmp(argv[i], "--debug=misc" ) ) {}
|
||||
else if( !strcmp(argv[i], "--debug=all" ) ) {}
|
||||
else if( !strcmp(argv[i], "--log=terminal" ) ) {}
|
||||
else if( !strcmp(argv[i], "--log=file" ) ) {}
|
||||
else if( !strcmp(argv[i], "--screensize") ||
|
||||
!strcmp(argv[i], "-s") ) {i++;}
|
||||
else if( !strcmp(argv[i], "--fullscreen") || !strcmp(argv[i], "-f")) {}
|
||||
|
Loading…
Reference in New Issue
Block a user