mirror of
https://git.eden-emu.dev/archive/citron
synced 2026-03-26 19:39:46 -04:00
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:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user