mirror of https://github.com/OpenRCT2/OpenRCT2.git
Activate OpenRCT2 window after using native file dialog on macOS (#20951)
This commit is contained in:
parent
0e5c82e2d4
commit
15fcaffc91
|
@ -129,6 +129,7 @@ namespace OpenRCT2::Ui
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
SDL_RaiseWindow(window);
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -137,10 +138,12 @@ namespace OpenRCT2::Ui
|
||||||
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
||||||
if ([panel runModal] == NSModalResponseCancel)
|
if ([panel runModal] == NSModalResponseCancel)
|
||||||
{
|
{
|
||||||
|
SDL_RaiseWindow(window);
|
||||||
return std::string();
|
return std::string();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
SDL_RaiseWindow(window);
|
||||||
return panel.URL.path.UTF8String;
|
return panel.URL.path.UTF8String;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -158,10 +161,12 @@ namespace OpenRCT2::Ui
|
||||||
{
|
{
|
||||||
NSString* selectedPath = panel.URL.path;
|
NSString* selectedPath = panel.URL.path;
|
||||||
const char* path = selectedPath.UTF8String;
|
const char* path = selectedPath.UTF8String;
|
||||||
|
SDL_RaiseWindow(window);
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
SDL_RaiseWindow(window);
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue