sys: Fix macOS compilation (as of 2dc1886) (#317)

* sys: Updated curl to latest version

* sys: Fix macOS compilation

* ui: Fix splash screen OpenGL init for macOS

* sys: Fix std::min compile errors

* git: Re-enabled macos workflow

* sys: Remove includes of the range library

* build: Find OpenGL using CMake

* sys/build: Fix bundled plugins on macOS

* build: Copy plugins to bundle when creating a bundle

* build: Fixup bundled plugins

* sys: Search for plugins in the bundle instead of in Application Support

* sys: Allow resources to be placed in multiple directories on macOS

* build: Output built plugins to the plugins/ directory when not creating a bundle on macOS

* sys: Fix Application Support paths on macOS

* sys: Define ftruncate64 on macOS

* sys: Fix absolute value computation for std::string::at on macOS

Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
Kuruyia
2021-10-09 23:07:58 +02:00
committed by GitHub
parent 21769886fc
commit 72ec6baf79
17 changed files with 100 additions and 75 deletions

View File

@@ -750,8 +750,9 @@ namespace hex::plugin::builtin {
size_t fileSize = file.getSize();
for (const auto &pattern : overwritePattern) {
for (u64 offset = 0; offset < fileSize; offset += 3) {
file.write(pattern.data(), std::min(pattern.size(), fileSize - offset));
file.write(pattern.data(), std::min<u64>(pattern.size(), fileSize - offset));
}
file.flush();
}