Fixed formatting
This commit is contained in:
parent
8a1f3b7c41
commit
c793a9c95c
3 changed files with 368 additions and 376 deletions
|
@ -246,8 +246,7 @@ void Config::ReadValues() {
|
|||
|
||||
// Network
|
||||
|
||||
Settings::values.network_route =
|
||||
config->GetString("Network", "network_route", "");
|
||||
Settings::values.network_route = config->GetString("Network", "network_route", "");
|
||||
|
||||
// Miscellaneous
|
||||
// log_filter has a different default here than from common
|
||||
|
|
|
@ -13,9 +13,9 @@
|
|||
|
||||
#include <android/api-level.h>
|
||||
#include <android/native_window_jni.h>
|
||||
#include <network/room_member.h>
|
||||
#include <network/network.h>
|
||||
#include <core/loader/nro.h>
|
||||
#include <network/network.h>
|
||||
#include <network/room_member.h>
|
||||
|
||||
#include "common/detached_tasks.h"
|
||||
#include "common/dynamic_library.h"
|
||||
|
@ -350,7 +350,8 @@ namespace {
|
|||
|
||||
if (const auto member = room_network.GetRoomMember().lock()) {
|
||||
// Prevent the user from trying to join a room while they are already joining.
|
||||
if (member->GetState() == Network::RoomMember::State::Joining || member->IsConnected()) {
|
||||
if (member->GetState() == Network::RoomMember::State::Joining ||
|
||||
member->IsConnected()) {
|
||||
return;
|
||||
} else {
|
||||
member->Join(nickname, server_addr, server_port);
|
||||
|
@ -795,16 +796,11 @@ void Java_org_yuzu_yuzu_1emu_NativeLibrary_submitInlineKeyboardInput(JNIEnv* env
|
|||
}
|
||||
|
||||
void Java_org_yuzu_yuzu_1emu_NativeLibrary_connectToRoom(JNIEnv* env, jclass clazz,
|
||||
jstring nickname,
|
||||
jstring server_addr,
|
||||
jint server_port,
|
||||
jstring password) {
|
||||
EmulationSession::GetInstance().DirectConnectToRoom(
|
||||
GetJString(env, nickname),
|
||||
jstring nickname, jstring server_addr,
|
||||
jint server_port, jstring password) {
|
||||
EmulationSession::GetInstance().DirectConnectToRoom(GetJString(env, nickname),
|
||||
GetJString(env, server_addr).c_str(),
|
||||
server_port,
|
||||
GetJString(env, password)
|
||||
);
|
||||
server_port, GetJString(env, password));
|
||||
}
|
||||
|
||||
jstring Java_org_yuzu_yuzu_1emu_NativeLibrary_getRoomMemberState(JNIEnv* env, jclass clazz) {
|
||||
|
|
|
@ -20,9 +20,9 @@
|
|||
#include <iphlpapi.h>
|
||||
#else
|
||||
#include <cerrno>
|
||||
#include <arpa/inet.h>
|
||||
#include <ifaddrs.h>
|
||||
#include <net/if.h>
|
||||
#include <arpa/inet.h>
|
||||
|
||||
#endif
|
||||
|
||||
|
@ -103,18 +103,15 @@ std::vector<NetworkInterface> GetAvailableNetworkInterfaces() {
|
|||
|
||||
boost::split(route_parts, Settings::values.network_route.GetValue(), boost::is_any_of(";"));
|
||||
|
||||
struct in_addr ip{}, sm{}, gw{};
|
||||
struct in_addr ip {
|
||||
}, sm{}, gw{};
|
||||
|
||||
inet_pton(AF_INET, route_parts[1].c_str(), &ip);
|
||||
inet_pton(AF_INET, route_parts[2].c_str(), &sm);
|
||||
inet_pton(AF_INET, route_parts[3].c_str(), &gw);
|
||||
|
||||
result.emplace_back(NetworkInterface{
|
||||
.name{route_parts[0]},
|
||||
.ip_address{ip},
|
||||
.subnet_mask{sm},
|
||||
.gateway{gw}
|
||||
});
|
||||
result.emplace_back(
|
||||
NetworkInterface{.name{route_parts[0]}, .ip_address{ip}, .subnet_mask{sm}, .gateway{gw}});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue