Allow to enforce default player using a config variable.

It can be used on Android until screen keyboard will be done.
This commit is contained in:
Deve 2017-01-10 22:10:43 +01:00
parent 0ffde761ef
commit 527132b6c8
2 changed files with 7 additions and 0 deletions

View File

@ -592,6 +592,8 @@ namespace UserConfigParams
PARAM_PREFIX bool m_no_start_screen PARAM_DEFAULT( false );
PARAM_PREFIX bool m_race_now PARAM_DEFAULT( false );
PARAM_PREFIX bool m_enforce_current_player PARAM_DEFAULT( false );
/** True to test funky ambient/diffuse/specularity in RGB &
* all anisotropic */

View File

@ -1679,6 +1679,11 @@ int main(int argc, char *argv[] )
}
else if (!UserConfigParams::m_no_start_screen)
{
if (UserConfigParams::m_enforce_current_player)
{
PlayerManager::get()->enforceCurrentPlayer();
}
// If there is a current player, it was saved in the config file,
// so we immediately start the main menu (unless it was requested
// to always show the login screen). Otherwise show the login