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:
committed by
Aaron van Geffen
parent
48d6e2f58f
commit
6e6753aaf1
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user