You've already forked OpenRCT2-Unity
mirror of
https://github.com/izzy2lost/OpenRCT2-Unity.git
synced 2026-03-10 12:38:22 -07:00
Activate OpenRCT2 window after using native file dialog on macOS (#20951)
This commit is contained in:
@@ -129,6 +129,7 @@ namespace OpenRCT2::Ui
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_RaiseWindow(window);
|
||||
return std::string();
|
||||
}
|
||||
|
||||
@@ -137,10 +138,12 @@ namespace OpenRCT2::Ui
|
||||
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
||||
if ([panel runModal] == NSModalResponseCancel)
|
||||
{
|
||||
SDL_RaiseWindow(window);
|
||||
return std::string();
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_RaiseWindow(window);
|
||||
return panel.URL.path.UTF8String;
|
||||
}
|
||||
}
|
||||
@@ -158,10 +161,12 @@ namespace OpenRCT2::Ui
|
||||
{
|
||||
NSString* selectedPath = panel.URL.path;
|
||||
const char* path = selectedPath.UTF8String;
|
||||
SDL_RaiseWindow(window);
|
||||
return path;
|
||||
}
|
||||
else
|
||||
{
|
||||
SDL_RaiseWindow(window);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user