1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Added MacOS OpenFolder support.

This commit is contained in:
Christian Schubert
2018-09-04 15:38:19 +02:00
committed by Aaron van Geffen
parent 48d6e2f58f
commit 6e6753aaf1
2 changed files with 14 additions and 0 deletions

View File

@@ -113,6 +113,11 @@ namespace OpenRCT2::Ui
}
}
void OpenFolder(const std::string& path) override
{
// TODO
}
std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) override
{
std::string result;

View File

@@ -59,6 +59,15 @@ namespace OpenRCT2::Ui
}
}
void OpenFolder(const std::string& path) override
{
@autoreleasepool {
NSString* nsPath = [NSString stringWithUTF8String:path.c_str()];
NSURL *folderURL = [NSURL fileURLWithPath: nsPath];
[[NSWorkspace sharedWorkspace] openURL: folderURL];
}
}
std::string ShowFileDialog(SDL_Window* window, const FileDialogDesc& desc) override
{
@autoreleasepool {