From d0f99d13711637bbe896df11f864f798bf5ca2c2 Mon Sep 17 00:00:00 2001 From: pineappleEA Date: Wed, 21 Sep 2022 03:10:45 +0200 Subject: [PATCH] early-access version 2967 --- README.md | 2 +- src/core/hle/service/ldn/lan_discovery.cpp | 10 +++++----- src/core/hle/service/ldn/lan_discovery.h | 4 ++-- src/core/hle/service/ldn/ldn_types.h | 6 +++++- src/yuzu/main.ui | 2 +- 5 files changed, 14 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index f0fbc8db9..1609abeac 100755 --- a/README.md +++ b/README.md @@ -1,7 +1,7 @@ yuzu emulator early access ============= -This is the source code for early-access 2966. +This is the source code for early-access 2967. ## Legal Notice diff --git a/src/core/hle/service/ldn/lan_discovery.cpp b/src/core/hle/service/ldn/lan_discovery.cpp index 5f3222217..8f3c04550 100755 --- a/src/core/hle/service/ldn/lan_discovery.cpp +++ b/src/core/hle/service/ldn/lan_discovery.cpp @@ -285,7 +285,7 @@ Result LANDiscovery::DestroyNetwork() { ResetStations(); SetState(State::AccessPointOpened); - LanEvent(); + lan_event(); return ResultSuccess; } @@ -320,7 +320,7 @@ Result LANDiscovery::Disconnect() { } SetState(State::StationOpened); - LanEvent(); + lan_event(); return ResultSuccess; } @@ -338,7 +338,7 @@ Result LANDiscovery::Initialize(LanEventFunc lan_event_, bool listening) { } connected_clients.clear(); - LanEvent = lan_event_; + lan_event = lan_event_; SetState(State::Initialized); @@ -405,13 +405,13 @@ void LANDiscovery::OnDisconnectFromHost() { host_ip = std::nullopt; if (state == State::StationConnected) { SetState(State::StationOpened); - LanEvent(); + lan_event(); } } void LANDiscovery::OnNetworkInfoChanged() { if (IsNodeStateChanged()) { - LanEvent(); + lan_event(); } return; } diff --git a/src/core/hle/service/ldn/lan_discovery.h b/src/core/hle/service/ldn/lan_discovery.h index e64e89424..3833cd764 100755 --- a/src/core/hle/service/ldn/lan_discovery.h +++ b/src/core/hle/service/ldn/lan_discovery.h @@ -110,7 +110,7 @@ protected: void SendPacket(const Network::LDNPacket& packet); static const LanEventFunc empty_func; - const Ssid fake_ssid{"YuzuFakeSsidForLdn"}; + static constexpr Ssid fake_ssid{"YuzuFakeSsidForLdn"}; bool inited{}; std::mutex packet_mutex; @@ -127,7 +127,7 @@ protected: std::vector connected_clients; std::optional host_ip; - LanEventFunc LanEvent; + LanEventFunc lan_event; Network::RoomNetwork& room_network; }; diff --git a/src/core/hle/service/ldn/ldn_types.h b/src/core/hle/service/ldn/ldn_types.h index de3cd6b76..44c2c773b 100755 --- a/src/core/hle/service/ldn/ldn_types.h +++ b/src/core/hle/service/ldn/ldn_types.h @@ -157,7 +157,7 @@ struct Ssid { Ssid() = default; - explicit Ssid(std::string_view data) { + constexpr explicit Ssid(std::string_view data) { length = static_cast(std::min(data.size(), SsidLengthMax)); data.copy(raw.data(), length); raw[length] = 0; @@ -170,6 +170,10 @@ struct Ssid { bool operator==(const Ssid& b) const { return (length == b.length) && (std::memcmp(raw.data(), b.raw.data(), length) == 0); } + + bool operator!=(const Ssid& b) const { + return !operator==(b); + } }; static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); diff --git a/src/yuzu/main.ui b/src/yuzu/main.ui index de1545216..74d49dbd4 100755 --- a/src/yuzu/main.ui +++ b/src/yuzu/main.ui @@ -125,7 +125,7 @@ true - Multiplayer + &Multiplayer