mirror of
https://github.com/mikage-emu/mikage-dev.git
synced 2025-01-06 21:40:59 +01:00
macOS: Various build fixes
This commit is contained in:
parent
124b385032
commit
f15d7c53a4
4 changed files with 13 additions and 2 deletions
|
@ -3,8 +3,11 @@
|
|||
|
||||
#include <range/v3/algorithm/find.hpp>
|
||||
#include <range/v3/algorithm/generate_n.hpp>
|
||||
#include <range/v3/algorithm/search.hpp>
|
||||
#include <range/v3/iterator/insert_iterators.hpp>
|
||||
|
||||
#include <codecvt>
|
||||
|
||||
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) };
|
||||
|
|
|
@ -685,7 +685,7 @@ static std::tuple<Result, uint64_t> 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");
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
|
||||
#include <framework/profiler.hpp>
|
||||
|
||||
#include <thread>
|
||||
|
||||
struct AudioFrontend;
|
||||
|
||||
class NetworkConsole;
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue