summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKiritoDv <kiritodev01@gmail.com>2025-03-07 17:59:01 -0600
committerLywx <kiritodev01@gmail.com>2025-03-07 18:00:41 -0600
commit9f46fcb26f1555dfaa20e7001426d275fc178085 (patch)
treebf184b7c50deb156bb6404cd5f634e9baa17b54a
parent5f8550790adb5ce374ac31965f533f91e8d36191 (diff)
Fixed some compilation issues
-rw-r--r--CMakeLists.txt7
-rw-r--r--src/port/GBIMiddleware.cpp4
2 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c83e5558a..8f12551fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -93,7 +93,12 @@ endif()
set(VERSION us)
set(USE_NETWORKING ON)
set(SKIP_XCODE_VERSION_CHECK ON)
+
+if(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
+set(GFX_DEBUG_DISASSEMBLER OFF)
+else()
set(GFX_DEBUG_DISASSEMBLER ON)
+endif()
# Add compile definitions for the target
add_compile_definitions(
@@ -395,12 +400,12 @@ if(USE_NETWORKING)
if(MSVC)
vcpkg_install_packages(sdl2-net)
endif()
- find_package(SDL2_net REQUIRED)
include_directories(${SDL2_NET_INCLUDE_DIRS})
target_compile_definitions(${PROJECT_NAME} PRIVATE USE_NETWORKING)
if(CMAKE_SYSTEM_NAME STREQUAL "NintendoSwitch")
target_link_libraries(${PROJECT_NAME} PRIVATE SDL2_net)
else()
+ find_package(SDL2_net REQUIRED)
target_link_libraries(${PROJECT_NAME} PRIVATE SDL2_net::SDL2_net)
endif()
endif()
diff --git a/src/port/GBIMiddleware.cpp b/src/port/GBIMiddleware.cpp
index 3881453d1..26ab8d08c 100644
--- a/src/port/GBIMiddleware.cpp
+++ b/src/port/GBIMiddleware.cpp
@@ -30,6 +30,10 @@ extern "C" void gSPVertex(Gfx* pkt, uintptr_t v, int n, int v0) {
}
extern "C" void gSPInvalidateTexCache(Gfx* pkt, uintptr_t texAddr) {
+#ifdef __SWITCH__
+ // TODO: This kills performance on the Switch, we need to limit the amount of times we call this
+ return;
+#endif
auto data = reinterpret_cast<char*>(texAddr);
if (texAddr != 0 && GameEngine_OTRSigCheck(data)) {