@@ -272,6 +272,7 @@ static void updateNumPlayersOnline(void)
272272 GadgetListBoxAddEntryText (listboxInfo, UnicodeString (L" " ), GameSpyColor[GSCOLOR_MOTD_HEADING ], -1 , -1 );
273273
274274 // NETWORK CAPS
275+ #if defined(USE_PORT_MAPPER)
275276 bool bHasPortMapped = NGMP_OnlineServicesManager::GetInstance ()->GetPortMapper ().HasPortOpen ();
276277 PortMapper::EMappingTech mappingTechUsed = NGMP_OnlineServicesManager::GetInstance ()->GetPortMapper ().GetPortMappingTechnologyUsed ();
277278
@@ -314,6 +315,7 @@ static void updateNumPlayersOnline(void)
314315 strPortState = " No Port Mapped" ;
315316 }
316317 }
318+ #endif
317319
318320 // END NETWORK CAPS
319321 while (aMotd.nextToken (&aLine, " \n " ))
@@ -350,9 +352,7 @@ static void updateNumPlayersOnline(void)
350352 GadgetListBoxAddEntryText (listboxInfo, line, c, -1 , -1 );
351353 }
352354
353- // add network caps
354-
355- // ECapabilityState NATDirectConnect = NGMP_OnlineServicesManager::GetInstance()->GetPortMapper().HasDirectConnect();
355+ #if defined(USE_PORT_MAPPER)
356356 int preferredPort = NGMP_OnlineServicesManager::GetInstance ()->GetPortMapper ().GetOpenPort ();
357357 {
358358 Color c = GameMakeColor (255 , 194 , 15 , 255 );
@@ -366,33 +366,8 @@ static void updateNumPlayersOnline(void)
366366 // network port
367367 line.format (L" Network Port: %d (%hs)" , preferredPort, strPortState.c_str ());
368368 GadgetListBoxAddEntryText (listboxInfo, line, c, -1 , -1 );
369-
370- /*
371- // direct connect
372- line.format(L"Direct Connect: %hs%hs",
373- NATDirectConnect == ECapabilityState::UNDETERMINED ? "Still Being Determined..." : NATDirectConnect == ECapabilityState::SUPPORTED ? "Supported" : "Unsupported",
374- #if !defined(GENERALS_ONLINE_PORT_MAP_FIREWALL_OVERRIDE_PORT)
375- (mappingTechUsed == PortMapper::EMappingTech::MANUAL) ? (NATDirectConnect == ECapabilityState::SUPPORTED ? "" : "\n\tWARNING: You have manually set a firewall port which does not appear to be open. Direct connectivity may not work.") : "",
376- #else
377- ""
378- #endif
379- );
380-
381- GadgetListBoxAddEntryText(listboxInfo, line, c, -1, -1);
382- */
383-
384- /*
385- // relayed connect
386- line.format(L"Relayed Connect: %hs", "Supported");
387- GadgetListBoxAddEntryText(listboxInfo, line, c, -1, -1);
388-
389-
390- // server region
391- line.format(L"Server Region: %hs (%dms)", NGMP_OnlineServicesManager::GetInstance()->GetQoSManager().GetPreferredRegionName().c_str(),
392- NGMP_OnlineServicesManager::GetInstance()->GetQoSManager().GetPreferredRegionLatency());
393- GadgetListBoxAddEntryText(listboxInfo, line, c, -1, -1);
394- */
395369 }
370+ #endif
396371
397372 }
398373}
0 commit comments