forked from rosebudai/OpenRCT2-Web
Activate OpenRCT2 window after using native file dialog on macOS (#20951)
This commit is contained in:
1 parent
0e5c82e2d4
commit
15fcaffc91
1 file changed
+5
@@ -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