File tree Expand file tree Collapse file tree 2 files changed +7
-2
lines changed
include/Geode/cocos/include Expand file tree Collapse file tree 2 files changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -28,7 +28,11 @@ THE SOFTWARE.
28
28
#define __CCTYPES_H__
29
29
30
30
#include < string>
31
+
32
+ #ifdef __cplusplus
31
33
#include < Geode/c++stl/gdstdlib.hpp>
34
+ #endif
35
+
32
36
#include " ../cocoa/CCGeometry.h"
33
37
#include " ../platform/CCGL.h"
34
38
Original file line number Diff line number Diff line change @@ -95,7 +95,7 @@ @implementation FileDialog
95
95
// default path
96
96
if (options.defaultPath ) {
97
97
auto defaultPath = [NSString stringWithUTF8String: options.defaultPath->c_str ()];
98
- [panel setDirectoryURL: [NSURL URLWithString : defaultPath]];
98
+ [panel setDirectoryURL: [NSURL fileURLWithPath : defaultPath]];
99
99
}
100
100
101
101
// other
@@ -153,8 +153,9 @@ @implementation FileDialog
153
153
}
154
154
155
155
+(void ) dispatchFilePickerWithMode : (file::PickMode)mode options : (file::FilePickOptions const &)options multiple : (bool )mult onCompletion : (void (^)(FileResult&&))onCompletion {
156
+ file::FilePickOptions optionsCopy = options;
156
157
dispatch_async (dispatch_get_main_queue (), ^{
157
- auto result = [self filePickerWithMode: mode options: options multiple: mult];
158
+ auto result = [self filePickerWithMode: mode options: optionsCopy multiple: mult];
158
159
onCompletion (std::move (result));
159
160
});
160
161
}
You can’t perform that action at this time.
0 commit comments