Fixed some compilation issues

This commit is contained in:
KiritoDv
2025-03-07 17:59:01 -06:00
parent b6c0ec700a
commit f0b91837fe
2 changed files with 10 additions and 1 deletions
+6 -1
View File
@@ -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()
+4
View File
@@ -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)) {