Merge pull request #8822 from FearlessTobi/multiplayer-fixes
network: Fixes and improvements to the room feature
This commit is contained in:
		| @@ -534,7 +534,7 @@ public: | ||||
|  | ||||
| private: | ||||
|     void CheckAvailability(Kernel::HLERequestContext& ctx) { | ||||
|         LOG_WARNING(Service_ACC, "(STUBBED) called"); | ||||
|         LOG_DEBUG(Service_ACC, "(STUBBED) called"); | ||||
|         IPC::ResponseBuilder rb{ctx, 3}; | ||||
|         rb.Push(ResultSuccess); | ||||
|         rb.Push(false); // TODO: Check when this is supposed to return true and when not | ||||
|   | ||||
| @@ -113,7 +113,7 @@ enum class LinkLevel : s8 { | ||||
|     Bad, | ||||
|     Low, | ||||
|     Good, | ||||
|     Excelent, | ||||
|     Excellent, | ||||
| }; | ||||
|  | ||||
| struct NodeLatestUpdate { | ||||
| @@ -145,11 +145,19 @@ struct NetworkId { | ||||
| static_assert(sizeof(NetworkId) == 0x20, "NetworkId is an invalid size"); | ||||
|  | ||||
| struct Ssid { | ||||
|     u8 length; | ||||
|     std::array<char, SsidLengthMax + 1> raw; | ||||
|     u8 length{}; | ||||
|     std::array<char, SsidLengthMax + 1> raw{}; | ||||
|  | ||||
|     Ssid() = default; | ||||
|  | ||||
|     explicit Ssid(std::string_view data) { | ||||
|         length = static_cast<u8>(std::min(data.size(), SsidLengthMax)); | ||||
|         data.copy(raw.data(), length); | ||||
|         raw[length] = 0; | ||||
|     } | ||||
|  | ||||
|     std::string GetStringValue() const { | ||||
|         return std::string(raw.data(), length); | ||||
|         return std::string(raw.data()); | ||||
|     } | ||||
| }; | ||||
| static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); | ||||
|   | ||||
| @@ -933,7 +933,11 @@ BSD::BSD(Core::System& system_, const char* name) | ||||
|     } | ||||
| } | ||||
|  | ||||
| BSD::~BSD() = default; | ||||
| BSD::~BSD() { | ||||
|     if (auto room_member = room_network.GetRoomMember().lock()) { | ||||
|         room_member->Unbind(proxy_packet_received); | ||||
|     } | ||||
| } | ||||
|  | ||||
| BSDCFG::BSDCFG(Core::System& system_) : ServiceFramework{system_, "bsdcfg"} { | ||||
|     // clang-format off | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 bunnei
					bunnei