Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,12 @@ endif()

# Set game compilation version
set(VERSION us)
set(USE_NETWORKING ON)
if(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch" OR CMAKE_SYSTEM_NAME STREQUAL "CafeOS")
set(USE_NETWORKING_DEFAULT OFF)
else()
set(USE_NETWORKING_DEFAULT ON)
endif()
option(USE_NETWORKING "Enable the Satella online relay / networking features" ${USE_NETWORKING_DEFAULT})
set(SKIP_XCODE_VERSION_CHECK ON)

# Add compile definitions for the target
Expand Down
6 changes: 3 additions & 3 deletions src/port/Engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -554,7 +554,7 @@ void GameEngine::RunExtract(int argc, char* argv[]) {
#endif
std::shared_ptr<BS::thread_pool> threadPool = std::make_shared<BS::thread_pool>(1);
while (true) {
#ifndef __SWITCH__
#ifdef USE_NETWORKING
auto satellaPhase = Satella::Client::Instance().GetPhase();
bool satellaActive = satellaPhase == Satella::Phase::Connecting || satellaPhase == Satella::Phase::FetchingKeys;
#else
Expand Down Expand Up @@ -837,7 +837,7 @@ void GameEngine::RunExtract(int argc, char* argv[]) {
continue;
}
case GS_COMPILE: {
#ifndef __SWITCH__
#ifdef USE_NETWORKING
threadPool->submit_task([&]() -> void {
Satella::Client::Instance().Execute();
extractStep = GS_LOAD;
Expand Down Expand Up @@ -937,7 +937,7 @@ void GameEngine::RunExtract(int argc, char* argv[]) {
ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoResize |
ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoScrollbar |
ImGuiWindowFlags_NoSavedSettings)) {
#ifndef __SWITCH__
#ifdef USE_NETWORKING
if (satellaActive) {
const char* msg = satellaPhase == Satella::Phase::Connecting ? "Connecting to Satella..."
: "Retrieving public keys...";
Expand Down
2 changes: 1 addition & 1 deletion src/port/api/relay.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __SWITCH__
#ifdef USE_NETWORKING
#include "relay.h"
#include "port/net/Relay.h"
#include "spdlog/spdlog.h"
Expand Down
2 changes: 1 addition & 1 deletion src/port/net/Relay.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __SWITCH__
#ifdef USE_NETWORKING
#include "Relay.h"
#include "SatellaClient.h"

Expand Down
2 changes: 1 addition & 1 deletion src/port/net/Relay.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#pragma once
#ifndef __SWITCH__
#ifdef USE_NETWORKING

#include <cstdint>
#include <functional>
Expand Down
2 changes: 1 addition & 1 deletion src/port/net/SatellaClient.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef __SWITCH__
#ifdef USE_NETWORKING
#include "port/net/SatellaClient.h"

#include "ship/Context.h"
Expand Down
2 changes: 1 addition & 1 deletion src/port/net/SatellaClient.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#ifndef __SWITCH__
#ifdef USE_NETWORKING
#include <condition_variable>
#include <cstdint>
#include <memory>
Expand Down
Loading