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(texAddr); if (texAddr != 0 && GameEngine_OTRSigCheck(data)) {