diff options
author | FearlessTobi <thm.frey@gmail.com> | 2022-07-25 17:08:20 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-07-25 21:59:31 +0200 |
commit | 6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b (patch) | |
tree | b70962e3698930c5b06d777bd912caa89a912391 /src/network/network.cpp | |
parent | yuzu_cmd: Fix compilation (diff) | |
download | yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.gz yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.bz2 yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.lz yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.xz yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.tar.zst yuzu-6a2dcc8b3d4ed0940e33d60fee701bcdb063eb6b.zip |
Diffstat (limited to 'src/network/network.cpp')
-rw-r--r-- | src/network/network.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
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 @@ namespace Network { RoomNetwork::RoomNetwork() { - g_room = std::make_shared<Room>(); - g_room_member = std::make_shared<RoomMember>(); + m_room = std::make_shared<Room>(); + m_room_member = std::make_shared<RoomMember>(); } bool RoomNetwork::Init() { @@ -19,30 +19,30 @@ bool RoomNetwork::Init() { LOG_ERROR(Network, "Error initalizing ENet"); return false; } - g_room = std::make_shared<Room>(); - g_room_member = std::make_shared<RoomMember>(); + m_room = std::make_shared<Room>(); + m_room_member = std::make_shared<RoomMember>(); LOG_DEBUG(Network, "initialized OK"); return true; } std::weak_ptr<Room> RoomNetwork::GetRoom() { - return g_room; + return m_room; } std::weak_ptr<RoomMember> RoomNetwork::GetRoomMember() { - return g_room_member; + return m_room_member; } void RoomNetwork::Shutdown() { - if (g_room_member) { - if (g_room_member->IsConnected()) - g_room_member->Leave(); - g_room_member.reset(); + if (m_room_member) { + if (m_room_member->IsConnected()) + m_room_member->Leave(); + m_room_member.reset(); } - if (g_room) { - if (g_room->GetState() == Room::State::Open) - g_room->Destroy(); - g_room.reset(); + if (m_room) { + if (m_room->GetState() == Room::State::Open) + m_room->Destroy(); + m_room.reset(); } enet_deinitialize(); LOG_DEBUG(Network, "shutdown OK"); |