From ae9432a334c6c0289329dfc0ab5bc0eef131bdc0 Mon Sep 17 00:00:00 2001 From: Alex Vanderveen Date: Sun, 16 Aug 2026 17:49:17 -0400 Subject: [PATCH] cmake hotfix windows --- lib/recomp-net | 2 +- runtime/runtime.cmake | 5 +++-- runtime/src/mod_packages.cpp | 7 +++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/lib/recomp-net b/lib/recomp-net index a5bd4be3..cc477419 160000 --- a/lib/recomp-net +++ b/lib/recomp-net @@ -1 +1 @@ -Subproject commit a5bd4be35d65255472889ebc662831c7ccbe7bbd +Subproject commit cc4774197fcf87b1c5ca409085ac6e57af68b9af diff --git a/runtime/runtime.cmake b/runtime/runtime.cmake index 799a53d8..b2c4f969 100644 --- a/runtime/runtime.cmake +++ b/runtime/runtime.cmake @@ -903,8 +903,9 @@ function(psxrecomp_add_runtime_target target) target_link_libraries(${target} PRIVATE chdr-static) # audio_trace.c uses C11 atomics. Make the runtime's actual language # requirement explicit instead of relying on a parent project's global - # CMAKE_C_STANDARD setting. - target_compile_features(${target} PRIVATE c_std_11) + # CMAKE_C_STANDARD setting. cxx_std_17 likewise — game CMakeLists may omit + # CMAKE_CXX_STANDARD; mod_packages.cpp must not compile as a pre-17 dialect. + target_compile_features(${target} PRIVATE c_std_11 cxx_std_17) # Game-specific executable name. Every title instantiates this function with # the same CMake target name ("psx-runtime"), so without this they ALL produce diff --git a/runtime/src/mod_packages.cpp b/runtime/src/mod_packages.cpp index 369d0bb6..f1d46d3a 100644 --- a/runtime/src/mod_packages.cpp +++ b/runtime/src/mod_packages.cpp @@ -1159,8 +1159,11 @@ void read_conditions(const toml::value& value, const std::vector& opt when[id] = condition_value; } } - for (const auto& [id, condition_value] : when) { - (void)condition_value; + /* Bind map entries to real locals before the lambda — capturing a + * structured binding is a C++20 extension and breaks MinGW C++17 builds. */ + for (const auto& entry : when) { + const std::string& id = entry.first; + const std::string& condition_value = entry.second; const auto option = std::find_if( options.begin(), options.end(), [&](const ModOption& item) {