@@ -42,7 +42,6 @@ extern ENGINE_API bool bShowPauseString;
42
42
43
43
// #define DEMO_BUILD
44
44
45
- #ifdef XR_PLATFORM_WINDOWS
46
45
constexpr cpcstr ErrMsgBoxTemplate[] =
47
46
{
48
47
" message_box_invalid_pass" ,
@@ -64,7 +63,6 @@ constexpr cpcstr ErrMsgBoxTemplate[] =
64
63
" msg_box_error_loading" ,
65
64
" message_box_download_level"
66
65
};
67
- #endif
68
66
69
67
extern bool b_shniaganeed_pp;
70
68
@@ -121,7 +119,6 @@ CMainMenu::CMainMenu()
121
119
g_statHint = xr_new<CUIButtonHint>();
122
120
m_pGameSpyFull = xr_new<CGameSpy_Full>();
123
121
124
- #ifdef XR_PLATFORM_WINDOWS
125
122
for (cpcstr name : ErrMsgBoxTemplate)
126
123
{
127
124
CUIMessageBoxEx* msgBox = m_pMB_ErrDlgs.emplace_back (xr_new<CUIMessageBoxEx>());
@@ -145,7 +142,7 @@ CMainMenu::CMainMenu()
145
142
downloadMsg->AddCallbackStr (
146
143
" button_yes" , MESSAGE_BOX_YES_CLICKED, CUIWndCallback::void_function (this , &CMainMenu::OnDownloadMPMap));
147
144
}
148
- # endif
145
+
149
146
m_account_mngr = xr_new<gamespy_gp::account_manager>(m_pGameSpyFull->GetGameSpyGP ());
150
147
m_login_mngr = xr_new<gamespy_gp::login_manager>(m_pGameSpyFull);
151
148
m_profile_store = xr_new<gamespy_profile::profile_store>();
@@ -165,13 +162,10 @@ CMainMenu::~CMainMenu()
165
162
166
163
g_pGamePersistent->m_pMainMenu = nullptr ;
167
164
168
- #ifdef XR_PLATFORM_WINDOWS
169
165
xr_delete (m_account_mngr);
170
166
xr_delete (m_login_mngr);
171
167
xr_delete (m_profile_store);
172
-
173
168
xr_delete (m_pGameSpyFull);
174
- #endif
175
169
176
170
xr_delete (m_demo_info_loader);
177
171
delete_data (m_pMB_ErrDlgs);
@@ -563,7 +557,6 @@ void CMainMenu::OnFrame()
563
557
Console->Show ();
564
558
}
565
559
566
- #ifdef XR_PLATFORM_WINDOWS
567
560
if (IsActive () || m_sPDProgress.IsInProgress )
568
561
{
569
562
GSUpdateStatus status = m_pGameSpyFull->Update ();
@@ -576,7 +569,6 @@ void CMainMenu::OnFrame()
576
569
case GSUpdateStatus::OutOfService: SetErrorDialog (ErrGSServiceFailed); break ;
577
570
}
578
571
}
579
- #endif
580
572
581
573
if (IsActive ())
582
574
{
@@ -704,7 +696,6 @@ void CMainMenu::OnPatchCheck(bool success, LPCSTR VersionName, LPCSTR URL)
704
696
705
697
void CMainMenu::OnDownloadPatch (CUIWindow*, void *)
706
698
{
707
- #ifdef XR_PLATFORM_WINDOWS
708
699
CGameSpy_Available GSA;
709
700
shared_str result_string;
710
701
if (!GSA.CheckAvailableServices (result_string))
@@ -739,7 +730,6 @@ void CMainMenu::OnDownloadPatch(CUIWindow*, void*)
739
730
progressCallback.bind (this , &CMainMenu::OnDownloadPatchProgress);
740
731
m_pGameSpyFull->GetGameSpyHTTP ()->DownloadFile (
741
732
*m_sPatchURL, *m_sPatchFileName, completionCallback, progressCallback);
742
- #endif
743
733
}
744
734
745
735
void CMainMenu::OnDownloadPatchResult (bool success)
@@ -799,10 +789,8 @@ void CMainMenu::OnRunDownloadedPatch(CUIWindow*, void*)
799
789
800
790
void CMainMenu::CancelDownload ()
801
791
{
802
- #ifdef XR_PLATFORM_WINDOWS
803
792
m_pGameSpyFull->GetGameSpyHTTP ()->StopDownload ();
804
793
m_sPDProgress.IsInProgress = false ;
805
- #endif
806
794
}
807
795
808
796
void CMainMenu::SetNeedVidRestart () { m_Flags.set (flNeedVidRestart, TRUE ); }
@@ -925,7 +913,6 @@ LPCSTR CMainMenu::GetGSVer()
925
913
926
914
LPCSTR CMainMenu::GetPlayerName ()
927
915
{
928
- #ifdef XR_PLATFORM_WINDOWS
929
916
gamespy_gp::login_manager* l_mngr = GetLoginMngr ();
930
917
gamespy_gp::profile const * tmp_prof = l_mngr ? l_mngr->get_current_profile () : NULL ;
931
918
@@ -934,7 +921,6 @@ LPCSTR CMainMenu::GetPlayerName()
934
921
m_player_name = tmp_prof->unique_nick ();
935
922
}
936
923
else
937
- #endif
938
924
{
939
925
string512 name;
940
926
GetPlayerName_FromRegistry (name, sizeof (name));
0 commit comments