diff --git a/source/processes/fs_common.cpp b/source/processes/fs_common.cpp index bca56c8..60c16bd 100644 --- a/source/processes/fs_common.cpp +++ b/source/processes/fs_common.cpp @@ -3,8 +3,11 @@ #include #include +#include #include +#include + namespace HLE { CommonPath CommonPath::FromUtf16(std::u16string_view utf16_data) { @@ -127,7 +130,8 @@ ValidatedHostPath PathValidator::ValidateAndGetSandboxedTreePath(const Utf8PathT auto new_path = sandbox_root; new_path += utf8_path; new_path = new_path.lexically_normal(); - if (new_path.begin() != std::search(new_path.begin(), new_path.end(), sandbox_root.begin(), sandbox_root.end())) { + auto new_path_str = new_path.string(); + if (ranges::begin(new_path_str) != ranges::search(new_path_str, sandbox_root.string()).begin()) { throw std::runtime_error(fmt::format("Requested path leaked out of sandbox: Got path {}, expected a child of {}", new_path, sandbox_root)); } return ValidatedHostPath { std::move(new_path) }; diff --git a/source/processes/pxi_fs.cpp b/source/processes/pxi_fs.cpp index a81dba2..d06e8a1 100644 --- a/source/processes/pxi_fs.cpp +++ b/source/processes/pxi_fs.cpp @@ -685,7 +685,7 @@ static std::tuple OpenFile(FakeThread& thread, Context& contex // TODO: Respect flags & ~0x4 ... in particular, write/read-only! if (file) {// TODO: Remove this check! We only do this so that we don't need to implement archive 0x56789a0b0 properly... FileContext file_context { *thread.GetLogger() }; - std::tie(result) = file->Open(file_context, { .create = flags & 0x4 }); + std::tie(result) = file->Open(file_context, { .create = (flags & 0x4) != 0 }); } if (result != RESULT_OK) { thread.GetLogger()->warn("Failed to open file"); diff --git a/source/session.hpp b/source/session.hpp index 4d1f7e8..102a8b5 100644 --- a/source/session.hpp +++ b/source/session.hpp @@ -9,6 +9,8 @@ #include +#include + struct AudioFrontend; class NetworkConsole; diff --git a/source/video_core/CMakeLists.txt b/source/video_core/CMakeLists.txt index 3d87385..5c493eb 100644 --- a/source/video_core/CMakeLists.txt +++ b/source/video_core/CMakeLists.txt @@ -48,3 +48,8 @@ if (Pistache_FOUND) endif() target_link_libraries(video_core PRIVATE Tracy::TracyClient) target_link_libraries(video_core PRIVATE xxHash::xxhash) + +if (CMAKE_SYSTEM_NAME STREQUAL "Darwin") + # Required for g_vulkan_queue_mutex + target_link_options(video_core PRIVATE "-undefined;dynamic_lookup") +endif()