mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2026-01-15 11:03:00 +01: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