diff --git a/external/imgui/CMakeLists.txt b/external/imgui/CMakeLists.txt index 8c115409..4ef3998b 100644 --- a/external/imgui/CMakeLists.txt +++ b/external/imgui/CMakeLists.txt @@ -14,11 +14,8 @@ add_library(imgui add_compile_definitions(IMGUI_IMPL_VULKAN_NO_PROTOTYPES) -if(WIN32) - target_compile_definitions(imgui PUBLIC NOMINMAX _CRT_SECURE_NO_WARNINGS) - if(MSVC) - target_compile_options(imgui PUBLIC /EHa) - endif() +if(MSVC) + target_compile_options(imgui PUBLIC /EHa) endif() target_include_directories(imgui PUBLIC ../parallel-rdp/parallel-rdp-standalone/volk diff --git a/external/parallel-rdp/CMakeLists.txt b/external/parallel-rdp/CMakeLists.txt index b3de6b78..750a18ef 100644 --- a/external/parallel-rdp/CMakeLists.txt +++ b/external/parallel-rdp/CMakeLists.txt @@ -45,7 +45,7 @@ add_library(parallel-rdp ) if(WIN32) - target_compile_definitions(parallel-rdp PUBLIC NOMINMAX _CRT_SECURE_NO_WARNINGS VK_USE_PLATFORM_WIN32_KHR) + target_compile_definitions(parallel-rdp PUBLIC VK_USE_PLATFORM_WIN32_KHR) if(MSVC) target_compile_options(parallel-rdp PUBLIC /EHa) endif() diff --git a/external/parallel-rdp/parallel-rdp-standalone b/external/parallel-rdp/parallel-rdp-standalone index f07bbaf8..afac4af7 160000 --- a/external/parallel-rdp/parallel-rdp-standalone +++ b/external/parallel-rdp/parallel-rdp-standalone @@ -1 +1 @@ -Subproject commit f07bbaf808d4a878d9a5a4020e17cb4f4a227d3a +Subproject commit afac4af72c9ce4b65b878e43138038ea0e1a8d22 diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 52df2ba9..a799649c 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -39,6 +39,10 @@ include_directories( ) add_compile_definitions(SIMD_SUPPORT) +if(WIN32) + add_definitions(-DNOMINMAX) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif () add_compile_options(-mssse3 -msse4.1) if(${CMAKE_BUILD_TYPE} MATCHES Debug) #add_compile_options(-fsanitize=address -fsanitize=undefined) @@ -60,6 +64,10 @@ add_subdirectory(../external/parallel-rdp parallel-rdp) add_executable(kaizen main.cpp) +if(MSVC) + target_compile_options(parallel-rdp PUBLIC /EHa) +endif() + file(COPY ${PROJECT_SOURCE_DIR}/../resources/ DESTINATION ${PROJECT_BINARY_DIR}/resources/) file(REMOVE ${PROJECT_BINARY_DIR}/resources/mario.png @@ -68,10 +76,3 @@ file(REMOVE target_link_libraries(kaizen PUBLIC frontend frontend-imgui discord-rpc imgui nfd parallel-rdp backend fmt::fmt nlohmann_json::nlohmann_json core registers interpreter mmio rsp SDL2::SDL2main SDL2::SDL2) - -if(WIN32) - target_compile_definitions(kaizen PUBLIC NOMINMAX _CRT_SECURE_NO_WARNINGS) - if(MSVC) - target_compile_options(parallel-rdp PUBLIC /EHa) - endif() -endif() \ No newline at end of file diff --git a/src/backend/Core.cpp b/src/backend/Core.cpp index af459eb6..fa977b31 100644 --- a/src/backend/Core.cpp +++ b/src/backend/Core.cpp @@ -65,7 +65,7 @@ void Core::Run(float volumeL, float volumeR) { cycles += taken; frameCycles += taken; - scheduler.tick(1, mem, regs); + scheduler.tick(taken, mem, regs); } cycles -= mmio.vi.cyclesPerHalfline;