diff --git a/3rdparty/flatbuffers b/3rdparty/flatbuffers index 595bf0007a..1872409707 160000 --- a/3rdparty/flatbuffers +++ b/3rdparty/flatbuffers @@ -1 +1 @@ -Subproject commit 595bf0007ab1929570c7671f091313c8fc20644e +Subproject commit 187240970746d00bbd26b0f5873ed54d2477f9f3 diff --git a/Utilities/bit_set.h b/Utilities/bit_set.h index 8b98ae0fd4..9fdbf15de1 100644 --- a/Utilities/bit_set.h +++ b/Utilities/bit_set.h @@ -23,7 +23,6 @@ Intersection (&) and symmetric difference (^) is also available. #include "util/types.hpp" #include "util/atomic.hpp" -#include "Utilities/StrFmt.h" template concept BitSetEnum = std::is_enum_v && requires(T x) @@ -384,6 +383,9 @@ public: } }; +template +struct fmt_unveil; + template struct fmt_unveil> { diff --git a/rpcs3/Crypto/utils.cpp b/rpcs3/Crypto/utils.cpp index 8d2fd4e9aa..71f687bf83 100644 --- a/rpcs3/Crypto/utils.cpp +++ b/rpcs3/Crypto/utils.cpp @@ -12,6 +12,7 @@ #include #include #include +#include "Utilities/StrFmt.h" #include "Utilities/StrUtil.h" #include "Utilities/File.h" diff --git a/rpcs3/Emu/NP/generated/np2_structs.fbs b/rpcs3/Emu/NP/generated/np2_structs.fbs index bf360bdb86..9ca6e4a437 100644 --- a/rpcs3/Emu/NP/generated/np2_structs.fbs +++ b/rpcs3/Emu/NP/generated/np2_structs.fbs @@ -206,7 +206,7 @@ table SetRoomDataInternalRequest { flagAttr:uint32; roomBinAttrInternal:[BinAttr]; passwordConfig:[RoomGroupPasswordConfig]; - passwordSlotMask:uint64; + passwordSlotMask:[uint64]; ownerPrivilegeRank:[uint16]; } diff --git a/rpcs3/Emu/NP/generated/np2_structs_generated.h b/rpcs3/Emu/NP/generated/np2_structs_generated.h index f1d24ae568..5dabacbbc9 100644 --- a/rpcs3/Emu/NP/generated/np2_structs_generated.h +++ b/rpcs3/Emu/NP/generated/np2_structs_generated.h @@ -8,9 +8,9 @@ // Ensure the included flatbuffers.h is the same version as when this file was // generated, otherwise it may not be compatible. -static_assert(FLATBUFFERS_VERSION_MAJOR == 24 && - FLATBUFFERS_VERSION_MINOR == 3 && - FLATBUFFERS_VERSION_REVISION == 25, +static_assert(FLATBUFFERS_VERSION_MAJOR == 25 && + FLATBUFFERS_VERSION_MINOR == 9 && + FLATBUFFERS_VERSION_REVISION == 23, "Non-compatible flatbuffers version included"); struct SignalingAddr; @@ -2762,8 +2762,8 @@ struct SetRoomDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffer const ::flatbuffers::Vector<::flatbuffers::Offset> *passwordConfig() const { return GetPointer> *>(VT_PASSWORDCONFIG); } - uint64_t passwordSlotMask() const { - return GetField(VT_PASSWORDSLOTMASK, 0); + const ::flatbuffers::Vector *passwordSlotMask() const { + return GetPointer *>(VT_PASSWORDSLOTMASK); } const ::flatbuffers::Vector *ownerPrivilegeRank() const { return GetPointer *>(VT_OWNERPRIVILEGERANK); @@ -2779,7 +2779,8 @@ struct SetRoomDataInternalRequest FLATBUFFERS_FINAL_CLASS : private ::flatbuffer VerifyOffset(verifier, VT_PASSWORDCONFIG) && verifier.VerifyVector(passwordConfig()) && verifier.VerifyVectorOfTables(passwordConfig()) && - VerifyField(verifier, VT_PASSWORDSLOTMASK, 8) && + VerifyOffset(verifier, VT_PASSWORDSLOTMASK) && + verifier.VerifyVector(passwordSlotMask()) && VerifyOffset(verifier, VT_OWNERPRIVILEGERANK) && verifier.VerifyVector(ownerPrivilegeRank()) && verifier.EndTable(); @@ -2805,8 +2806,8 @@ struct SetRoomDataInternalRequestBuilder { void add_passwordConfig(::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> passwordConfig) { fbb_.AddOffset(SetRoomDataInternalRequest::VT_PASSWORDCONFIG, passwordConfig); } - void add_passwordSlotMask(uint64_t passwordSlotMask) { - fbb_.AddElement(SetRoomDataInternalRequest::VT_PASSWORDSLOTMASK, passwordSlotMask, 0); + void add_passwordSlotMask(::flatbuffers::Offset<::flatbuffers::Vector> passwordSlotMask) { + fbb_.AddOffset(SetRoomDataInternalRequest::VT_PASSWORDSLOTMASK, passwordSlotMask); } void add_ownerPrivilegeRank(::flatbuffers::Offset<::flatbuffers::Vector> ownerPrivilegeRank) { fbb_.AddOffset(SetRoomDataInternalRequest::VT_OWNERPRIVILEGERANK, ownerPrivilegeRank); @@ -2829,12 +2830,12 @@ inline ::flatbuffers::Offset CreateSetRoomDataIntern uint32_t flagAttr = 0, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> roomBinAttrInternal = 0, ::flatbuffers::Offset<::flatbuffers::Vector<::flatbuffers::Offset>> passwordConfig = 0, - uint64_t passwordSlotMask = 0, + ::flatbuffers::Offset<::flatbuffers::Vector> passwordSlotMask = 0, ::flatbuffers::Offset<::flatbuffers::Vector> ownerPrivilegeRank = 0) { SetRoomDataInternalRequestBuilder builder_(_fbb); - builder_.add_passwordSlotMask(passwordSlotMask); builder_.add_roomId(roomId); builder_.add_ownerPrivilegeRank(ownerPrivilegeRank); + builder_.add_passwordSlotMask(passwordSlotMask); builder_.add_passwordConfig(passwordConfig); builder_.add_roomBinAttrInternal(roomBinAttrInternal); builder_.add_flagAttr(flagAttr); @@ -2849,10 +2850,11 @@ inline ::flatbuffers::Offset CreateSetRoomDataIntern uint32_t flagAttr = 0, const std::vector<::flatbuffers::Offset> *roomBinAttrInternal = nullptr, const std::vector<::flatbuffers::Offset> *passwordConfig = nullptr, - uint64_t passwordSlotMask = 0, + const std::vector *passwordSlotMask = nullptr, const std::vector *ownerPrivilegeRank = nullptr) { auto roomBinAttrInternal__ = roomBinAttrInternal ? _fbb.CreateVector<::flatbuffers::Offset>(*roomBinAttrInternal) : 0; auto passwordConfig__ = passwordConfig ? _fbb.CreateVector<::flatbuffers::Offset>(*passwordConfig) : 0; + auto passwordSlotMask__ = passwordSlotMask ? _fbb.CreateVector(*passwordSlotMask) : 0; auto ownerPrivilegeRank__ = ownerPrivilegeRank ? _fbb.CreateVector(*ownerPrivilegeRank) : 0; return CreateSetRoomDataInternalRequest( _fbb, @@ -2861,7 +2863,7 @@ inline ::flatbuffers::Offset CreateSetRoomDataIntern flagAttr, roomBinAttrInternal__, passwordConfig__, - passwordSlotMask, + passwordSlotMask__, ownerPrivilegeRank__); } diff --git a/rpcs3/Emu/NP/rpcn_client.cpp b/rpcs3/Emu/NP/rpcn_client.cpp index c1dce01cdb..e02078f512 100644 --- a/rpcs3/Emu/NP/rpcn_client.cpp +++ b/rpcs3/Emu/NP/rpcn_client.cpp @@ -255,7 +255,7 @@ namespace rpcn rpcn_log.notice("online: %s, pr_com_id: %s, pr_title: %s, pr_status: %s, pr_comment: %s, pr_data: %s", online ? "true" : "false", pr_com_id.data, pr_title, pr_status, pr_comment, fmt::buf_to_hexstring(pr_data.data(), pr_data.size())); } - constexpr u32 RPCN_PROTOCOL_VERSION = 26; + constexpr u32 RPCN_PROTOCOL_VERSION = 27; constexpr usz RPCN_HEADER_SIZE = 15; const char* error_to_explanation(rpcn::ErrorType error) @@ -2019,9 +2019,13 @@ namespace rpcn } final_grouppasswordconfig_vec = builder.CreateVector(davec); } - u64 final_passwordSlotMask = 0; + + flatbuffers::Offset> final_passwordSlotMask; if (req->passwordSlotMask) - final_passwordSlotMask = *req->passwordSlotMask; + { + const u64 value = *req->passwordSlotMask; + final_passwordSlotMask = builder.CreateVector(&value, 1); + } flatbuffers::Offset> final_ownerprivilege_vec; if (req->ownerPrivilegeRankNum && req->ownerPrivilegeRank) diff --git a/rpcs3/Emu/NP/rpcn_config.cpp b/rpcs3/Emu/NP/rpcn_config.cpp index b489d7d924..204091d295 100644 --- a/rpcs3/Emu/NP/rpcn_config.cpp +++ b/rpcs3/Emu/NP/rpcn_config.cpp @@ -190,9 +190,8 @@ bool cfg_rpcn::add_host(std::string_view new_description, std::string_view new_h bool cfg_rpcn::del_host(std::string_view del_description, std::string_view del_host) { - // Do not delete default servers - if ((del_description == "Official RPCN Server" && del_host == "np.rpcs3.net") || - (del_description == "RPCN Test Server" && del_host == "test-np.rpcs3.net")) + // Do not delete default server + if (del_description == "Official RPCN Server" && del_host == "np.rpcs3.net") { return true; } diff --git a/rpcs3/Emu/NP/rpcn_config.h b/rpcs3/Emu/NP/rpcn_config.h index a94eb053b7..0a8c7c9cc5 100644 --- a/rpcs3/Emu/NP/rpcn_config.h +++ b/rpcs3/Emu/NP/rpcn_config.h @@ -9,7 +9,7 @@ struct cfg_rpcn : cfg::node cfg::string npid{this, "NPID", ""}; cfg::string password{this, "Password", ""}; cfg::string token{this, "Token", ""}; - cfg::string hosts{this, "Hosts", "Official RPCN Server|np.rpcs3.net|||RPCN Test Server|test-np.rpcs3.net"}; + cfg::string hosts{this, "Hosts", "Official RPCN Server|np.rpcs3.net"}; cfg::_bool ipv6_support{this, "IPv6 support", true}; void load();