mirror of
https://github.com/geode-sdk/geode.git
synced 2024-12-18 03:42:25 -05:00
maybe mac fix 4
This commit is contained in:
parent
3ce86df1d6
commit
444434aff5
1 changed files with 3 additions and 2 deletions
|
@ -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() {
|
||||||
|
|
Loading…
Reference in a new issue