From def811b12260833750568caa0d47008ae8bb9d30 Mon Sep 17 00:00:00 2001 From: AconiteGodOfSWG <63141077+AconiteGodOfSWG@users.noreply.github.com> Date: Tue, 25 Aug 2020 18:37:27 -0500 Subject: [PATCH] Fix storing user and pass in client cfg --- .../src/shared/page/SwgCuiLoginScreen.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiLoginScreen.cpp b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiLoginScreen.cpp index 3631acae3..cc6cd0bd3 100644 --- a/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiLoginScreen.cpp +++ b/src/game/client/library/swgClientUserInterface/src/shared/page/SwgCuiLoginScreen.cpp @@ -85,12 +85,19 @@ m_connecting (false) } else { - m_passwordTextbox->SetLocalText (Unicode::emptyString); + if (ConfigClientGame::getLoginClientID()) { + m_usernameTextbox->SetLocalText(Unicode::narrowToWide(ConfigClientGame::getLoginClientID())); + } + else { + m_usernameTextbox->SetLocalText(Unicode::emptyString); + } - if (ConfigClientGame::getLoginClientID ()) - m_usernameTextbox->SetLocalText (Unicode::narrowToWide (ConfigClientGame::getLoginClientID ())); - else - m_usernameTextbox->SetLocalText (Unicode::emptyString); + if (ConfigClientGame::getLoginClientPassword()) { + m_passwordTextbox->SetLocalText(Unicode::narrowToWide(ConfigClientGame::getLoginClientPassword())); + } + else { + m_passwordTextbox->SetLocalText(Unicode::emptyString); + } } DEBUG_REPORT_LOG_PRINT (true, ("SwgCuiLoginScreen: username=%s, sessionId=%s\n", ConfigClientGame::getLoginClientID (), sessionId ? sessionId : "null"));