housekeeping

This commit is contained in:
scawful
2024-08-07 01:21:52 -04:00
parent 2a1509b311
commit 8c13ef3e23
5 changed files with 16 additions and 16 deletions

View File

@@ -30,23 +30,21 @@ void ShowOpenFileDialogImpl(void (^completionHandler)(std::string)) {
std::string ShowOpenFileDialogSync() {
__block std::string result;
ShowOpenFileDialogImpl(^(std::string filePath) {
result = filePath;
});
// Check if the documentPicker is done
// while (result.empty()) {
// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
// }
// Check if the documentPicker is done
// while (result.empty()) {
// [[NSRunLoop currentRunLoop] runMode:NSDefaultRunLoopMode beforeDate:[NSDate distantFuture]];
// }
return result;
}
}
std::string FileDialogWrapper::ShowOpenFileDialog() {
return ShowOpenFileDialogSync();
}
std::string FileDialogWrapper::ShowOpenFileDialog() { return ShowOpenFileDialogSync(); }
std::string FileDialogWrapper::ShowOpenFolderDialog() { return ""; }