maybe mac fix 4

This commit is contained in:
Fleeym 2024-06-13 04:14:31 +03:00
parent 3ce86df1d6
commit 444434aff5

View file

@ -1,3 +1,4 @@
#include "Geode/utils/file.hpp"
#include <Geode/DefaultInclude.hpp> #include <Geode/DefaultInclude.hpp>
using namespace geode::prelude; using namespace geode::prelude;
@ -181,14 +182,14 @@ GEODE_DLL Task<Result<std::filesystem::path>> file::pick(file::PickMode mode, fi
GEODE_DLL Task<Result<std::vector<std::filesystem::path>>> file::pickMany(file::FilePickOptions const& options) { GEODE_DLL Task<Result<std::vector<std::filesystem::path>>> file::pickMany(file::FilePickOptions const& options) {
using RetTask = Task<Result<std::vector<std::filesystem::path>>>; using RetTask = Task<Result<std::vector<std::filesystem::path>>>;
return RetTask::runWithCallback([options](auto resultCallback, auto progress, auto cancelled) { return RetTask::runWithCallback([options](auto resultCallback, auto progress, auto cancelled) {
[FileDialog dispatchFilePickerWithMode:mode options:options multiple:true onCompletion: ^(FileResult result) { [FileDialog dispatchFilePickerWithMode: file::PickMode::OpenFile options:options multiple:true onCompletion: ^(FileResult result) {
if (cancelled()) { if (cancelled()) {
resultCallback(RetTask::Cancel()); resultCallback(RetTask::Cancel());
} else { } else {
resultCallback(result); resultCallback(result);
} }
}]; }];
}) });
} }
CCPoint cocos::getMousePos() { CCPoint cocos::getMousePos() {