diff options
| author | 2022-07-25 17:08:20 +0200 | |
|---|---|---|
| committer | 2022-07-25 21:59:31 +0200 | |
| commit | 6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b (patch) | |
| tree | b70962e3698930c5b06d777bd912caa89a912391 | |
| parent | yuzu_cmd: Fix compilation (diff) | |
| download | yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.gz yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.xz yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.zip | |
network, yuzu: Improve variable naming and style consistency
| -rw-r--r-- | src/common/announce_multiplayer_room.h | 2 | ||||
| -rw-r--r-- | src/network/network.cpp | 28 | ||||
| -rw-r--r-- | src/network/network.h | 4 | ||||
| -rw-r--r-- | src/network/room.cpp | 16 | ||||
| -rw-r--r-- | src/network/room_member.cpp | 6 | ||||
| -rw-r--r-- | src/network/verify_user.cpp | 2 | ||||
| -rw-r--r-- | src/network/verify_user.h | 6 | ||||
| -rw-r--r-- | src/web_service/announce_room_json.cpp | 4 | ||||
| -rw-r--r-- | src/web_service/verify_user_jwt.cpp | 4 | ||||
| -rw-r--r-- | src/web_service/verify_user_jwt.h | 2 | ||||
| -rw-r--r-- | src/yuzu/multiplayer/host_room.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/multiplayer/lobby.cpp | 8 | ||||
| -rw-r--r-- | src/yuzu/multiplayer/lobby_p.h | 4 | ||||
| -rw-r--r-- | src/yuzu/multiplayer/state.cpp | 12 |
14 files changed, 53 insertions, 47 deletions
diff --git a/src/common/announce_multiplayer_room.h b/src/common/announce_multiplayer_room.h index a9e2f89b7..11a80aa8e 100644 --- a/src/common/announce_multiplayer_room.h +++ b/src/common/announce_multiplayer_room.h | |||
| @@ -43,7 +43,7 @@ struct Room { | |||
| 43 | RoomInformation information; | 43 | RoomInformation information; |
| 44 | 44 | ||
| 45 | std::string id; | 45 | std::string id; |
| 46 | std::string verify_UID; ///< UID used for verification | 46 | std::string verify_uid; ///< UID used for verification |
| 47 | std::string ip; | 47 | std::string ip; |
| 48 | u32 net_version; | 48 | u32 net_version; |
| 49 | bool has_password; | 49 | bool has_password; |
diff --git a/src/network/network.cpp b/src/network/network.cpp index e1401a403..36b70c36f 100644 --- a/src/network/network.cpp +++ b/src/network/network.cpp | |||
| @@ -10,8 +10,8 @@ | |||
| 10 | namespace Network { | 10 | namespace Network { |
| 11 | 11 | ||
| 12 | RoomNetwork::RoomNetwork() { | 12 | RoomNetwork::RoomNetwork() { |
| 13 | g_room = std::make_shared<Room>(); | 13 | m_room = std::make_shared<Room>(); |
| 14 | g_room_member = std::make_shared<RoomMember>(); | 14 | m_room_member = std::make_shared<RoomMember>(); |
| 15 | } | 15 | } |
| 16 | 16 | ||
| 17 | bool RoomNetwork::Init() { | 17 | bool RoomNetwork::Init() { |
| @@ -19,30 +19,30 @@ bool RoomNetwork::Init() { | |||
| 19 | LOG_ERROR(Network, "Error initalizing ENet"); | 19 | LOG_ERROR(Network, "Error initalizing ENet"); |
| 20 | return false; | 20 | return false; |
| 21 | } | 21 | } |
| 22 | g_room = std::make_shared<Room>(); | 22 | m_room = std::make_shared<Room>(); |
| 23 | g_room_member = std::make_shared<RoomMember>(); | 23 | m_room_member = std::make_shared<RoomMember>(); |
| 24 | LOG_DEBUG(Network, "initialized OK"); | 24 | LOG_DEBUG(Network, "initialized OK"); |
| 25 | return true; | 25 | return true; |
| 26 | } | 26 | } |
| 27 | 27 | ||
| 28 | std::weak_ptr<Room> RoomNetwork::GetRoom() { | 28 | std::weak_ptr<Room> RoomNetwork::GetRoom() { |
| 29 | return g_room; | 29 | return m_room; |
| 30 | } | 30 | } |
| 31 | 31 | ||
| 32 | std::weak_ptr<RoomMember> RoomNetwork::GetRoomMember() { | 32 | std::weak_ptr<RoomMember> RoomNetwork::GetRoomMember() { |
| 33 | return g_room_member; | 33 | return m_room_member; |
| 34 | } | 34 | } |
| 35 | 35 | ||
| 36 | void RoomNetwork::Shutdown() { | 36 | void RoomNetwork::Shutdown() { |
| 37 | if (g_room_member) { | 37 | if (m_room_member) { |
| 38 | if (g_room_member->IsConnected()) | 38 | if (m_room_member->IsConnected()) |
| 39 | g_room_member->Leave(); | 39 | m_room_member->Leave(); |
| 40 | g_room_member.reset(); | 40 | m_room_member.reset(); |
| 41 | } | 41 | } |
| 42 | if (g_room) { | 42 | if (m_room) { |
| 43 | if (g_room->GetState() == Room::State::Open) | 43 | if (m_room->GetState() == Room::State::Open) |
| 44 | g_room->Destroy(); | 44 | m_room->Destroy(); |
| 45 | g_room.reset(); | 45 | m_room.reset(); |
| 46 | } | 46 | } |
| 47 | enet_deinitialize(); | 47 | enet_deinitialize(); |
| 48 | LOG_DEBUG(Network, "shutdown OK"); | 48 | LOG_DEBUG(Network, "shutdown OK"); |
diff --git a/src/network/network.h b/src/network/network.h index 74eb42bf5..a38f04029 100644 --- a/src/network/network.h +++ b/src/network/network.h | |||
| @@ -27,8 +27,8 @@ public: | |||
| 27 | void Shutdown(); | 27 | void Shutdown(); |
| 28 | 28 | ||
| 29 | private: | 29 | private: |
| 30 | std::shared_ptr<RoomMember> g_room_member; ///< RoomMember (Client) for network games | 30 | std::shared_ptr<RoomMember> m_room_member; ///< RoomMember (Client) for network games |
| 31 | std::shared_ptr<Room> g_room; ///< Room (Server) for network games | 31 | std::shared_ptr<Room> m_room; ///< Room (Server) for network games |
| 32 | }; | 32 | }; |
| 33 | 33 | ||
| 34 | } // namespace Network | 34 | } // namespace Network |
diff --git a/src/network/room.cpp b/src/network/room.cpp index 22491b299..b22c5fb89 100644 --- a/src/network/room.cpp +++ b/src/network/room.cpp | |||
| @@ -29,8 +29,8 @@ public: | |||
| 29 | std::atomic<State> state{State::Closed}; ///< Current state of the room. | 29 | std::atomic<State> state{State::Closed}; ///< Current state of the room. |
| 30 | RoomInformation room_information; ///< Information about this room. | 30 | RoomInformation room_information; ///< Information about this room. |
| 31 | 31 | ||
| 32 | std::string verify_UID; ///< A GUID which may be used for verfication. | 32 | std::string verify_uid; ///< A GUID which may be used for verfication. |
| 33 | mutable std::mutex verify_UID_mutex; ///< Mutex for verify_UID | 33 | mutable std::mutex verify_uid_mutex; ///< Mutex for verify_uid |
| 34 | 34 | ||
| 35 | std::string password; ///< The password required to connect to this room. | 35 | std::string password; ///< The password required to connect to this room. |
| 36 | 36 | ||
| @@ -369,8 +369,8 @@ void Room::RoomImpl::HandleJoinRequest(const ENetEvent* event) { | |||
| 369 | 369 | ||
| 370 | std::string uid; | 370 | std::string uid; |
| 371 | { | 371 | { |
| 372 | std::lock_guard lock(verify_UID_mutex); | 372 | std::lock_guard lock(verify_uid_mutex); |
| 373 | uid = verify_UID; | 373 | uid = verify_uid; |
| 374 | } | 374 | } |
| 375 | member.user_data = verify_backend->LoadUserData(uid, token); | 375 | member.user_data = verify_backend->LoadUserData(uid, token); |
| 376 | 376 | ||
| @@ -1056,8 +1056,8 @@ const RoomInformation& Room::GetRoomInformation() const { | |||
| 1056 | } | 1056 | } |
| 1057 | 1057 | ||
| 1058 | std::string Room::GetVerifyUID() const { | 1058 | std::string Room::GetVerifyUID() const { |
| 1059 | std::lock_guard lock(room_impl->verify_UID_mutex); | 1059 | std::lock_guard lock(room_impl->verify_uid_mutex); |
| 1060 | return room_impl->verify_UID; | 1060 | return room_impl->verify_uid; |
| 1061 | } | 1061 | } |
| 1062 | 1062 | ||
| 1063 | Room::BanList Room::GetBanList() const { | 1063 | Room::BanList Room::GetBanList() const { |
| @@ -1086,8 +1086,8 @@ bool Room::HasPassword() const { | |||
| 1086 | } | 1086 | } |
| 1087 | 1087 | ||
| 1088 | void Room::SetVerifyUID(const std::string& uid) { | 1088 | void Room::SetVerifyUID(const std::string& uid) { |
| 1089 | std::lock_guard lock(room_impl->verify_UID_mutex); | 1089 | std::lock_guard lock(room_impl->verify_uid_mutex); |
| 1090 | room_impl->verify_UID = uid; | 1090 | room_impl->verify_uid = uid; |
| 1091 | } | 1091 | } |
| 1092 | 1092 | ||
| 1093 | void Room::Destroy() { | 1093 | void Room::Destroy() { |
diff --git a/src/network/room_member.cpp b/src/network/room_member.cpp index 11a2e276e..d8cb32721 100644 --- a/src/network/room_member.cpp +++ b/src/network/room_member.cpp | |||
| @@ -416,8 +416,9 @@ void RoomMember::RoomMemberImpl::Disconnect() { | |||
| 416 | room_information.member_slots = 0; | 416 | room_information.member_slots = 0; |
| 417 | room_information.name.clear(); | 417 | room_information.name.clear(); |
| 418 | 418 | ||
| 419 | if (!server) | 419 | if (!server) { |
| 420 | return; | 420 | return; |
| 421 | } | ||
| 421 | enet_peer_disconnect(server, 0); | 422 | enet_peer_disconnect(server, 0); |
| 422 | 423 | ||
| 423 | ENetEvent event; | 424 | ENetEvent event; |
| @@ -483,8 +484,9 @@ template <typename T> | |||
| 483 | void RoomMember::RoomMemberImpl::Invoke(const T& data) { | 484 | void RoomMember::RoomMemberImpl::Invoke(const T& data) { |
| 484 | std::lock_guard lock(callback_mutex); | 485 | std::lock_guard lock(callback_mutex); |
| 485 | CallbackSet<T> callback_set = callbacks.Get<T>(); | 486 | CallbackSet<T> callback_set = callbacks.Get<T>(); |
| 486 | for (auto const& callback : callback_set) | 487 | for (auto const& callback : callback_set) { |
| 487 | (*callback)(data); | 488 | (*callback)(data); |
| 489 | } | ||
| 488 | } | 490 | } |
| 489 | 491 | ||
| 490 | template <typename T> | 492 | template <typename T> |
diff --git a/src/network/verify_user.cpp b/src/network/verify_user.cpp index d9d98e495..51094e9bc 100644 --- a/src/network/verify_user.cpp +++ b/src/network/verify_user.cpp | |||
| @@ -10,7 +10,7 @@ Backend::~Backend() = default; | |||
| 10 | 10 | ||
| 11 | NullBackend::~NullBackend() = default; | 11 | NullBackend::~NullBackend() = default; |
| 12 | 12 | ||
| 13 | UserData NullBackend::LoadUserData([[maybe_unused]] const std::string& verify_UID, | 13 | UserData NullBackend::LoadUserData([[maybe_unused]] const std::string& verify_uid, |
| 14 | [[maybe_unused]] const std::string& token) { | 14 | [[maybe_unused]] const std::string& token) { |
| 15 | return {}; | 15 | return {}; |
| 16 | } | 16 | } |
diff --git a/src/network/verify_user.h b/src/network/verify_user.h index 5c3852d4a..ddae67e99 100644 --- a/src/network/verify_user.h +++ b/src/network/verify_user.h | |||
| @@ -25,11 +25,11 @@ public: | |||
| 25 | 25 | ||
| 26 | /** | 26 | /** |
| 27 | * Verifies the given token and loads the information into a UserData struct. | 27 | * Verifies the given token and loads the information into a UserData struct. |
| 28 | * @param verify_UID A GUID that may be used for verification. | 28 | * @param verify_uid A GUID that may be used for verification. |
| 29 | * @param token A token that contains user data and verification data. The format and content is | 29 | * @param token A token that contains user data and verification data. The format and content is |
| 30 | * decided by backends. | 30 | * decided by backends. |
| 31 | */ | 31 | */ |
| 32 | virtual UserData LoadUserData(const std::string& verify_UID, const std::string& token) = 0; | 32 | virtual UserData LoadUserData(const std::string& verify_uid, const std::string& token) = 0; |
| 33 | }; | 33 | }; |
| 34 | 34 | ||
| 35 | /** | 35 | /** |
| @@ -40,7 +40,7 @@ class NullBackend final : public Backend { | |||
| 40 | public: | 40 | public: |
| 41 | ~NullBackend(); | 41 | ~NullBackend(); |
| 42 | 42 | ||
| 43 | UserData LoadUserData(const std::string& verify_UID, const std::string& token) override; | 43 | UserData LoadUserData(const std::string& verify_uid, const std::string& token) override; |
| 44 | }; | 44 | }; |
| 45 | 45 | ||
| 46 | } // namespace Network::VerifyUser | 46 | } // namespace Network::VerifyUser |
diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp index 082bebaa9..0aae8e215 100644 --- a/src/web_service/announce_room_json.cpp +++ b/src/web_service/announce_room_json.cpp | |||
| @@ -54,7 +54,7 @@ static void to_json(nlohmann::json& json, const Room& room) { | |||
| 54 | } | 54 | } |
| 55 | 55 | ||
| 56 | static void from_json(const nlohmann::json& json, Room& room) { | 56 | static void from_json(const nlohmann::json& json, Room& room) { |
| 57 | room.verify_UID = json.at("externalGuid").get<std::string>(); | 57 | room.verify_uid = json.at("externalGuid").get<std::string>(); |
| 58 | room.ip = json.at("address").get<std::string>(); | 58 | room.ip = json.at("address").get<std::string>(); |
| 59 | room.information.name = json.at("name").get<std::string>(); | 59 | room.information.name = json.at("name").get<std::string>(); |
| 60 | try { | 60 | try { |
| @@ -116,7 +116,7 @@ WebService::WebResult RoomJson::Register() { | |||
| 116 | auto reply_json = nlohmann::json::parse(result.returned_data); | 116 | auto reply_json = nlohmann::json::parse(result.returned_data); |
| 117 | room = reply_json.get<AnnounceMultiplayerRoom::Room>(); | 117 | room = reply_json.get<AnnounceMultiplayerRoom::Room>(); |
| 118 | room_id = reply_json.at("id").get<std::string>(); | 118 | room_id = reply_json.at("id").get<std::string>(); |
| 119 | return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_UID}; | 119 | return WebService::WebResult{WebService::WebResult::Code::Success, "", room.verify_uid}; |
| 120 | } | 120 | } |
| 121 | 121 | ||
| 122 | void RoomJson::ClearPlayers() { | 122 | void RoomJson::ClearPlayers() { |
diff --git a/src/web_service/verify_user_jwt.cpp b/src/web_service/verify_user_jwt.cpp index 3133dcbe2..2f294d378 100644 --- a/src/web_service/verify_user_jwt.cpp +++ b/src/web_service/verify_user_jwt.cpp | |||
| @@ -35,9 +35,9 @@ std::string GetPublicKey(const std::string& host) { | |||
| 35 | 35 | ||
| 36 | VerifyUserJWT::VerifyUserJWT(const std::string& host) : pub_key(GetPublicKey(host)) {} | 36 | VerifyUserJWT::VerifyUserJWT(const std::string& host) : pub_key(GetPublicKey(host)) {} |
| 37 | 37 | ||
| 38 | Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_UID, | 38 | Network::VerifyUser::UserData VerifyUserJWT::LoadUserData(const std::string& verify_uid, |
| 39 | const std::string& token) { | 39 | const std::string& token) { |
| 40 | const std::string audience = fmt::format("external-{}", verify_UID); | 40 | const std::string audience = fmt::format("external-{}", verify_uid); |
| 41 | using namespace jwt::params; | 41 | using namespace jwt::params; |
| 42 | std::error_code error; | 42 | std::error_code error; |
| 43 | auto decoded = | 43 | auto decoded = |
diff --git a/src/web_service/verify_user_jwt.h b/src/web_service/verify_user_jwt.h index 6db74c208..ec3cc2904 100644 --- a/src/web_service/verify_user_jwt.h +++ b/src/web_service/verify_user_jwt.h | |||
| @@ -17,7 +17,7 @@ public: | |||
| 17 | VerifyUserJWT(const std::string& host); | 17 | VerifyUserJWT(const std::string& host); |
| 18 | ~VerifyUserJWT() = default; | 18 | ~VerifyUserJWT() = default; |
| 19 | 19 | ||
| 20 | Network::VerifyUser::UserData LoadUserData(const std::string& verify_UID, | 20 | Network::VerifyUser::UserData LoadUserData(const std::string& verify_uid, |
| 21 | const std::string& token) override; | 21 | const std::string& token) override; |
| 22 | 22 | ||
| 23 | private: | 23 | private: |
diff --git a/src/yuzu/multiplayer/host_room.cpp b/src/yuzu/multiplayer/host_room.cpp index a48077544..f59c6a28d 100644 --- a/src/yuzu/multiplayer/host_room.cpp +++ b/src/yuzu/multiplayer/host_room.cpp | |||
| @@ -163,7 +163,7 @@ void HostRoomWindow::Host() { | |||
| 163 | // Start the announce session if they chose Public | 163 | // Start the announce session if they chose Public |
| 164 | if (is_public) { | 164 | if (is_public) { |
| 165 | if (auto session = announce_multiplayer_session.lock()) { | 165 | if (auto session = announce_multiplayer_session.lock()) { |
| 166 | // Register the room first to ensure verify_UID is present when we connect | 166 | // Register the room first to ensure verify_uid is present when we connect |
| 167 | WebService::WebResult result = session->Register(); | 167 | WebService::WebResult result = session->Register(); |
| 168 | if (result.result_code != WebService::WebResult::Code::Success) { | 168 | if (result.result_code != WebService::WebResult::Code::Success) { |
| 169 | QMessageBox::warning( | 169 | QMessageBox::warning( |
diff --git a/src/yuzu/multiplayer/lobby.cpp b/src/yuzu/multiplayer/lobby.cpp index 0c6648ab5..6daef9712 100644 --- a/src/yuzu/multiplayer/lobby.cpp +++ b/src/yuzu/multiplayer/lobby.cpp | |||
| @@ -149,11 +149,11 @@ void Lobby::OnJoinRoom(const QModelIndex& source) { | |||
| 149 | const std::string ip = | 149 | const std::string ip = |
| 150 | proxy->data(connection_index, LobbyItemHost::HostIPRole).toString().toStdString(); | 150 | proxy->data(connection_index, LobbyItemHost::HostIPRole).toString().toStdString(); |
| 151 | int port = proxy->data(connection_index, LobbyItemHost::HostPortRole).toInt(); | 151 | int port = proxy->data(connection_index, LobbyItemHost::HostPortRole).toInt(); |
| 152 | const std::string verify_UID = | 152 | const std::string verify_uid = |
| 153 | proxy->data(connection_index, LobbyItemHost::HostVerifyUIDRole).toString().toStdString(); | 153 | proxy->data(connection_index, LobbyItemHost::HostVerifyUIDRole).toString().toStdString(); |
| 154 | 154 | ||
| 155 | // attempt to connect in a different thread | 155 | // attempt to connect in a different thread |
| 156 | QFuture<void> f = QtConcurrent::run([nickname, ip, port, password, verify_UID, this] { | 156 | QFuture<void> f = QtConcurrent::run([nickname, ip, port, password, verify_uid, this] { |
| 157 | std::string token; | 157 | std::string token; |
| 158 | #ifdef ENABLE_WEB_SERVICE | 158 | #ifdef ENABLE_WEB_SERVICE |
| 159 | if (!Settings::values.yuzu_username.GetValue().empty() && | 159 | if (!Settings::values.yuzu_username.GetValue().empty() && |
| @@ -161,7 +161,7 @@ void Lobby::OnJoinRoom(const QModelIndex& source) { | |||
| 161 | WebService::Client client(Settings::values.web_api_url.GetValue(), | 161 | WebService::Client client(Settings::values.web_api_url.GetValue(), |
| 162 | Settings::values.yuzu_username.GetValue(), | 162 | Settings::values.yuzu_username.GetValue(), |
| 163 | Settings::values.yuzu_token.GetValue()); | 163 | Settings::values.yuzu_token.GetValue()); |
| 164 | token = client.GetExternalJWT(verify_UID).returned_data; | 164 | token = client.GetExternalJWT(verify_uid).returned_data; |
| 165 | if (token.empty()) { | 165 | if (token.empty()) { |
| 166 | LOG_ERROR(WebService, "Could not get external JWT, verification may fail"); | 166 | LOG_ERROR(WebService, "Could not get external JWT, verification may fail"); |
| 167 | } else { | 167 | } else { |
| @@ -239,7 +239,7 @@ void Lobby::OnRefreshLobby() { | |||
| 239 | smdh_icon), | 239 | smdh_icon), |
| 240 | new LobbyItemHost(QString::fromStdString(room.information.host_username), | 240 | new LobbyItemHost(QString::fromStdString(room.information.host_username), |
| 241 | QString::fromStdString(room.ip), room.information.port, | 241 | QString::fromStdString(room.ip), room.information.port, |
| 242 | QString::fromStdString(room.verify_UID)), | 242 | QString::fromStdString(room.verify_uid)), |
| 243 | new LobbyItemMemberList(members, room.information.member_slots), | 243 | new LobbyItemMemberList(members, room.information.member_slots), |
| 244 | }); | 244 | }); |
| 245 | model->appendRow(row); | 245 | model->appendRow(row); |
diff --git a/src/yuzu/multiplayer/lobby_p.h b/src/yuzu/multiplayer/lobby_p.h index afb8b99dc..bb2de4af3 100644 --- a/src/yuzu/multiplayer/lobby_p.h +++ b/src/yuzu/multiplayer/lobby_p.h | |||
| @@ -123,11 +123,11 @@ public: | |||
| 123 | static const int HostVerifyUIDRole = Qt::UserRole + 4; | 123 | static const int HostVerifyUIDRole = Qt::UserRole + 4; |
| 124 | 124 | ||
| 125 | LobbyItemHost() = default; | 125 | LobbyItemHost() = default; |
| 126 | explicit LobbyItemHost(QString username, QString ip, u16 port, QString verify_UID) { | 126 | explicit LobbyItemHost(QString username, QString ip, u16 port, QString verify_uid) { |
| 127 | setData(username, HostUsernameRole); | 127 | setData(username, HostUsernameRole); |
| 128 | setData(ip, HostIPRole); | 128 | setData(ip, HostIPRole); |
| 129 | setData(port, HostPortRole); | 129 | setData(port, HostPortRole); |
| 130 | setData(verify_UID, HostVerifyUIDRole); | 130 | setData(verify_uid, HostVerifyUIDRole); |
| 131 | } | 131 | } |
| 132 | 132 | ||
| 133 | QVariant data(int role) const override { | 133 | QVariant data(int role) const override { |
diff --git a/src/yuzu/multiplayer/state.cpp b/src/yuzu/multiplayer/state.cpp index de25225dd..661a32b3e 100644 --- a/src/yuzu/multiplayer/state.cpp +++ b/src/yuzu/multiplayer/state.cpp | |||
| @@ -98,14 +98,18 @@ void MultiplayerState::retranslateUi() { | |||
| 98 | status_text->setText(tr("Not Connected")); | 98 | status_text->setText(tr("Not Connected")); |
| 99 | } | 99 | } |
| 100 | 100 | ||
| 101 | if (lobby) | 101 | if (lobby) { |
| 102 | lobby->RetranslateUi(); | 102 | lobby->RetranslateUi(); |
| 103 | if (host_room) | 103 | } |
| 104 | if (host_room) { | ||
| 104 | host_room->RetranslateUi(); | 105 | host_room->RetranslateUi(); |
| 105 | if (client_room) | 106 | } |
| 107 | if (client_room) { | ||
| 106 | client_room->RetranslateUi(); | 108 | client_room->RetranslateUi(); |
| 107 | if (direct_connect) | 109 | } |
| 110 | if (direct_connect) { | ||
| 108 | direct_connect->RetranslateUi(); | 111 | direct_connect->RetranslateUi(); |
| 112 | } | ||
| 109 | } | 113 | } |
| 110 | 114 | ||
| 111 | void MultiplayerState::OnNetworkStateChanged(const Network::RoomMember::State& state) { | 115 | void MultiplayerState::OnNetworkStateChanged(const Network::RoomMember::State& state) { |