@@ -42,7 +42,6 @@ extern ENGINE_API bool bShowPauseString;
4242
4343// #define DEMO_BUILD
4444
45- #ifdef XR_PLATFORM_WINDOWS
4645constexpr cpcstr ErrMsgBoxTemplate[] =
4746{
4847 " message_box_invalid_pass" ,
@@ -64,7 +63,6 @@ constexpr cpcstr ErrMsgBoxTemplate[] =
6463 " msg_box_error_loading" ,
6564 " message_box_download_level"
6665};
67- #endif
6866
6967extern bool b_shniaganeed_pp;
7068
@@ -121,7 +119,6 @@ CMainMenu::CMainMenu()
121119 g_statHint = xr_new<CUIButtonHint>();
122120 m_pGameSpyFull = xr_new<CGameSpy_Full>();
123121
124- #ifdef XR_PLATFORM_WINDOWS
125122 for (cpcstr name : ErrMsgBoxTemplate)
126123 {
127124 CUIMessageBoxEx* msgBox = m_pMB_ErrDlgs.emplace_back (xr_new<CUIMessageBoxEx>());
@@ -145,7 +142,7 @@ CMainMenu::CMainMenu()
145142 downloadMsg->AddCallbackStr (
146143 " button_yes" , MESSAGE_BOX_YES_CLICKED, CUIWndCallback::void_function (this , &CMainMenu::OnDownloadMPMap));
147144 }
148- # endif
145+
149146 m_account_mngr = xr_new<gamespy_gp::account_manager>(m_pGameSpyFull->GetGameSpyGP ());
150147 m_login_mngr = xr_new<gamespy_gp::login_manager>(m_pGameSpyFull);
151148 m_profile_store = xr_new<gamespy_profile::profile_store>();
@@ -165,13 +162,10 @@ CMainMenu::~CMainMenu()
165162
166163 g_pGamePersistent->m_pMainMenu = nullptr ;
167164
168- #ifdef XR_PLATFORM_WINDOWS
169165 xr_delete (m_account_mngr);
170166 xr_delete (m_login_mngr);
171167 xr_delete (m_profile_store);
172-
173168 xr_delete (m_pGameSpyFull);
174- #endif
175169
176170 xr_delete (m_demo_info_loader);
177171 delete_data (m_pMB_ErrDlgs);
@@ -563,7 +557,6 @@ void CMainMenu::OnFrame()
563557 Console->Show ();
564558 }
565559
566- #ifdef XR_PLATFORM_WINDOWS
567560 if (IsActive () || m_sPDProgress.IsInProgress )
568561 {
569562 GSUpdateStatus status = m_pGameSpyFull->Update ();
@@ -576,7 +569,6 @@ void CMainMenu::OnFrame()
576569 case GSUpdateStatus::OutOfService: SetErrorDialog (ErrGSServiceFailed); break ;
577570 }
578571 }
579- #endif
580572
581573 if (IsActive ())
582574 {
@@ -704,7 +696,6 @@ void CMainMenu::OnPatchCheck(bool success, LPCSTR VersionName, LPCSTR URL)
704696
705697void CMainMenu::OnDownloadPatch (CUIWindow*, void *)
706698{
707- #ifdef XR_PLATFORM_WINDOWS
708699 CGameSpy_Available GSA;
709700 shared_str result_string;
710701 if (!GSA.CheckAvailableServices (result_string))
@@ -739,7 +730,6 @@ void CMainMenu::OnDownloadPatch(CUIWindow*, void*)
739730 progressCallback.bind (this , &CMainMenu::OnDownloadPatchProgress);
740731 m_pGameSpyFull->GetGameSpyHTTP ()->DownloadFile (
741732 *m_sPatchURL, *m_sPatchFileName, completionCallback, progressCallback);
742- #endif
743733}
744734
745735void CMainMenu::OnDownloadPatchResult (bool success)
@@ -799,10 +789,8 @@ void CMainMenu::OnRunDownloadedPatch(CUIWindow*, void*)
799789
800790void CMainMenu::CancelDownload ()
801791{
802- #ifdef XR_PLATFORM_WINDOWS
803792 m_pGameSpyFull->GetGameSpyHTTP ()->StopDownload ();
804793 m_sPDProgress.IsInProgress = false ;
805- #endif
806794}
807795
808796void CMainMenu::SetNeedVidRestart () { m_Flags.set (flNeedVidRestart, TRUE ); }
@@ -925,7 +913,6 @@ LPCSTR CMainMenu::GetGSVer()
925913
926914LPCSTR CMainMenu::GetPlayerName ()
927915{
928- #ifdef XR_PLATFORM_WINDOWS
929916 gamespy_gp::login_manager* l_mngr = GetLoginMngr ();
930917 gamespy_gp::profile const * tmp_prof = l_mngr ? l_mngr->get_current_profile () : NULL ;
931918
@@ -934,7 +921,6 @@ LPCSTR CMainMenu::GetPlayerName()
934921 m_player_name = tmp_prof->unique_nick ();
935922 }
936923 else
937- #endif
938924 {
939925 string512 name;
940926 GetPlayerName_FromRegistry (name, sizeof (name));
0 commit comments