fix: Multiplayer network fixes and airplane mode

- Auto-select network interface for direct connect/host room
- Always recreate ENet client on join for fresh bindings
- Add airplane mode toggle (Desktop & Android)
- Fix JWT verification with empty verify_uid
- Improve content-type handling for JWT endpoints

Signed-off-by: Zephyron <zephyron@citron-emu.org>
This commit is contained in:
Zephyron
2025-11-10 17:16:45 +10:00
parent 2943eebc9c
commit be5c2f772c
16 changed files with 129 additions and 15 deletions

View File

@@ -1,4 +1,5 @@
// SPDX-FileCopyrightText: Copyright 2021 yuzu Emulator Project
// SPDX-FileCopyrightText: Copyright 2025 Citron Emulator Project
// SPDX-License-Identifier: GPL-2.0-or-later
#include <algorithm>
@@ -187,6 +188,11 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() {
#endif
std::optional<NetworkInterface> GetSelectedNetworkInterface() {
// If airplane mode is enabled, return no interface (similar to Switch's airplane mode)
if (Settings::values.airplane_mode.GetValue()) {
return std::nullopt;
}
const auto& selected_network_interface = Settings::values.network_interface.GetValue();
const auto network_interfaces = Network::GetAvailableNetworkInterfaces();
if (network_interfaces.empty()) {