mirror of https://github.com/OpenRCT2/OpenRCT2.git
Fix #6383: macOS deprecation errors when compiling.
This commit is contained in:
parent
4224193d68
commit
0217734c4e
|
@ -36,6 +36,7 @@
|
|||
- Improved: [#6186] Transparent menu items now draw properly in OpenGL mode.
|
||||
- Improved: [#6218] Speed up game start up time by saving scenario index to file.
|
||||
- Improved: Load/save window now refreshes list if native file dialog is closed/cancelled.
|
||||
- Technical: [#6384] On macOS, address NSFileHandlingPanel deprecation by using NSModalResponse instead.
|
||||
|
||||
0.1.1 (2017-08-09)
|
||||
------------------------------------------------------------------------
|
||||
|
|
|
@ -102,7 +102,8 @@ namespace OpenRCT2 { namespace Ui
|
|||
panel.title = [NSString stringWithUTF8String:desc.Title.c_str()];
|
||||
panel.allowedFileTypes = extensions;
|
||||
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
||||
if ([panel runModal] == NSFileHandlingPanelCancelButton){
|
||||
if ([panel runModal] == NSModalResponseCancel)
|
||||
{
|
||||
return std::string();
|
||||
} else {
|
||||
return panel.URL.path.UTF8String;
|
||||
|
@ -118,7 +119,7 @@ namespace OpenRCT2 { namespace Ui
|
|||
panel.canChooseFiles = false;
|
||||
panel.canChooseDirectories = true;
|
||||
panel.allowsMultipleSelection = false;
|
||||
if ([panel runModal] == NSFileHandlingPanelOKButton)
|
||||
if ([panel runModal] == NSModalResponseOK)
|
||||
{
|
||||
NSString *selectedPath = panel.URL.path;
|
||||
const char *path = selectedPath.UTF8String;
|
||||
|
|
Loading…
Reference in New Issue