diff options
| author | 2022-07-17 22:53:44 -0500 | |
|---|---|---|
| committer | 2022-07-25 21:59:31 +0200 | |
| commit | 899c8bb33094f43fbd8df9afb4ca84718ebac87e (patch) | |
| tree | 392a54ac863f67b37bdfb006f739e8e840a9ab16 /src/network | |
| parent | Address second part of review comments (diff) | |
| download | yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.gz yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.tar.xz yuzu-899c8bb33094f43fbd8df9afb4ca84718ebac87e.zip | |
common: multiplayer: Use GameInfo type
Diffstat (limited to 'src/network')
| -rw-r--r-- | src/network/room.cpp | 8 | ||||
| -rw-r--r-- | src/network/room.h | 3 | ||||
| -rw-r--r-- | src/network/room_member.cpp | 2 |
3 files changed, 5 insertions, 8 deletions
diff --git a/src/network/room.cpp b/src/network/room.cpp index fe55d194c..22491b299 100644 --- a/src/network/room.cpp +++ b/src/network/room.cpp | |||
| @@ -811,7 +811,7 @@ void Room::RoomImpl::BroadcastRoomInformation() { | |||
| 811 | packet << room_information.description; | 811 | packet << room_information.description; |
| 812 | packet << room_information.member_slots; | 812 | packet << room_information.member_slots; |
| 813 | packet << room_information.port; | 813 | packet << room_information.port; |
| 814 | packet << room_information.preferred_game; | 814 | packet << room_information.preferred_game.name; |
| 815 | packet << room_information.host_username; | 815 | packet << room_information.host_username; |
| 816 | 816 | ||
| 817 | packet << static_cast<u32>(members.size()); | 817 | packet << static_cast<u32>(members.size()); |
| @@ -1013,7 +1013,7 @@ Room::~Room() = default; | |||
| 1013 | bool Room::Create(const std::string& name, const std::string& description, | 1013 | bool Room::Create(const std::string& name, const std::string& description, |
| 1014 | const std::string& server_address, u16 server_port, const std::string& password, | 1014 | const std::string& server_address, u16 server_port, const std::string& password, |
| 1015 | const u32 max_connections, const std::string& host_username, | 1015 | const u32 max_connections, const std::string& host_username, |
| 1016 | const std::string& preferred_game, u64 preferred_game_id, | 1016 | const GameInfo preferred_game, |
| 1017 | std::unique_ptr<VerifyUser::Backend> verify_backend, | 1017 | std::unique_ptr<VerifyUser::Backend> verify_backend, |
| 1018 | const Room::BanList& ban_list, bool enable_yuzu_mods) { | 1018 | const Room::BanList& ban_list, bool enable_yuzu_mods) { |
| 1019 | ENetAddress address; | 1019 | ENetAddress address; |
| @@ -1036,7 +1036,6 @@ bool Room::Create(const std::string& name, const std::string& description, | |||
| 1036 | room_impl->room_information.member_slots = max_connections; | 1036 | room_impl->room_information.member_slots = max_connections; |
| 1037 | room_impl->room_information.port = server_port; | 1037 | room_impl->room_information.port = server_port; |
| 1038 | room_impl->room_information.preferred_game = preferred_game; | 1038 | room_impl->room_information.preferred_game = preferred_game; |
| 1039 | room_impl->room_information.preferred_game_id = preferred_game_id; | ||
| 1040 | room_impl->room_information.host_username = host_username; | 1039 | room_impl->room_information.host_username = host_username; |
| 1041 | room_impl->room_information.enable_yuzu_mods = enable_yuzu_mods; | 1040 | room_impl->room_information.enable_yuzu_mods = enable_yuzu_mods; |
| 1042 | room_impl->password = password; | 1041 | room_impl->password = password; |
| @@ -1076,8 +1075,7 @@ std::vector<Member> Room::GetRoomMemberList() const { | |||
| 1076 | member.display_name = member_impl.user_data.display_name; | 1075 | member.display_name = member_impl.user_data.display_name; |
| 1077 | member.avatar_url = member_impl.user_data.avatar_url; | 1076 | member.avatar_url = member_impl.user_data.avatar_url; |
| 1078 | member.mac_address = member_impl.mac_address; | 1077 | member.mac_address = member_impl.mac_address; |
| 1079 | member.game_name = member_impl.game_info.name; | 1078 | member.game = member_impl.game_info; |
| 1080 | member.game_id = member_impl.game_info.id; | ||
| 1081 | member_list.push_back(member); | 1079 | member_list.push_back(member); |
| 1082 | } | 1080 | } |
| 1083 | return member_list; | 1081 | return member_list; |
diff --git a/src/network/room.h b/src/network/room.h index f282a5ac3..90a82563f 100644 --- a/src/network/room.h +++ b/src/network/room.h | |||
| @@ -125,8 +125,7 @@ public: | |||
| 125 | const std::string& server = "", u16 server_port = DefaultRoomPort, | 125 | const std::string& server = "", u16 server_port = DefaultRoomPort, |
| 126 | const std::string& password = "", | 126 | const std::string& password = "", |
| 127 | const u32 max_connections = MaxConcurrentConnections, | 127 | const u32 max_connections = MaxConcurrentConnections, |
| 128 | const std::string& host_username = "", const std::string& preferred_game = "", | 128 | const std::string& host_username = "", const GameInfo = {}, |
| 129 | u64 preferred_game_id = 0, | ||
| 130 | std::unique_ptr<VerifyUser::Backend> verify_backend = nullptr, | 129 | std::unique_ptr<VerifyUser::Backend> verify_backend = nullptr, |
| 131 | const BanList& ban_list = {}, bool enable_yuzu_mods = false); | 130 | const BanList& ban_list = {}, bool enable_yuzu_mods = false); |
| 132 | 131 | ||
diff --git a/src/network/room_member.cpp b/src/network/room_member.cpp index d6ace9b39..11a2e276e 100644 --- a/src/network/room_member.cpp +++ b/src/network/room_member.cpp | |||
| @@ -303,7 +303,7 @@ void RoomMember::RoomMemberImpl::HandleRoomInformationPacket(const ENetEvent* ev | |||
| 303 | packet >> info.description; | 303 | packet >> info.description; |
| 304 | packet >> info.member_slots; | 304 | packet >> info.member_slots; |
| 305 | packet >> info.port; | 305 | packet >> info.port; |
| 306 | packet >> info.preferred_game; | 306 | packet >> info.preferred_game.name; |
| 307 | packet >> info.host_username; | 307 | packet >> info.host_username; |
| 308 | room_information.name = info.name; | 308 | room_information.name = info.name; |
| 309 | room_information.description = info.description; | 309 | room_information.description = info.description; |