| 1550 | } |
| 1551 | else |
| 1552 | { |
| 1553 | ApplyModdedJoin(); |
| 1554 | } |
| 1555 | } |
| 1556 | break; |
| 1557 | } |
| 1558 | case IDD_MODS_DOWNLOAD: |
| 1559 | // A modded-join download finished: on success, switch to the required mod |
| 1560 | // set + arm the deferred connect (the PendingConnect hook joins after the |
| 1561 | // re-mount). On cancel, just return to the browser. |
| 1562 | Display::OnChildDestroyed(idd, exit); |
| 1563 | if (exit == IDC_OK) |
| 1564 | { |
| 1565 | ApplyModdedJoin(); |
| 1566 | } |
| 1567 | else |
| 1568 | { |
| 1569 | Poseidon::DiscardStagedModInstalls(_joinStagedInstalls); |
| 1570 | } |
| 1571 | break; |
| 1572 | default: |
| 1573 | Display::OnChildDestroyed(idd, exit); |
| 1574 | break; |
| 1575 | } |
| 1576 | } |
| 1577 | |
| 1578 | void DisplayMultiplayer::UpdateAddress(RString ipAddress, int port) |
| 1579 | { |
| 1580 | _ipAddress = ipAddress; |
| 1581 | SetPort(port); |
| 1582 | bool lan = _ipAddress.GetLength() == 0; |
| 1583 | SetSource(lan ? BSLAN : BSRemote); |
| 1584 | |
| 1585 | CStatic* title = dynamic_cast<CStatic*>(GetCtrl(IDC_MULTI_TITLE)); |
| 1586 | if (title) |
| 1587 | { |
| 1588 | char buffer[256]; |
| 1589 | if (lan) |
| 1590 | { |
| 1591 | ::sprintf(buffer, LocalizeString(IDS_MULTI_TITLE_LAN), port); |
| 1592 | } |
| 1593 | else |
| 1594 | { |
| 1595 | ::sprintf(buffer, LocalizeString(IDS_MULTI_TITLE_REMOTE), (const char*)_ipAddress, port); |
| 1596 | } |
| 1597 | title->SetText(buffer); |
| 1598 | } |
| 1599 | |
| 1600 | if (!GetNetworkManager().Init(ipAddress, port)) |
| 1601 | { |
| 1602 | Fail("Network"); |
| 1603 | } |
| 1604 | } |
| 1605 | |
| 1606 | void DisplayMultiplayer::UpdatePassword(RString password) |
| 1607 | { |
| 1608 | _password = password; |
| 1609 |
nothing calls this directly
no test coverage detected