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: [#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: [#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.
|
- 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)
|
0.1.1 (2017-08-09)
|
||||||
------------------------------------------------------------------------
|
------------------------------------------------------------------------
|
||||||
|
|
|
@ -102,7 +102,8 @@ namespace OpenRCT2 { namespace Ui
|
||||||
panel.title = [NSString stringWithUTF8String:desc.Title.c_str()];
|
panel.title = [NSString stringWithUTF8String:desc.Title.c_str()];
|
||||||
panel.allowedFileTypes = extensions;
|
panel.allowedFileTypes = extensions;
|
||||||
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
panel.directoryURL = [NSURL fileURLWithPath:directory];
|
||||||
if ([panel runModal] == NSFileHandlingPanelCancelButton){
|
if ([panel runModal] == NSModalResponseCancel)
|
||||||
|
{
|
||||||
return std::string();
|
return std::string();
|
||||||
} else {
|
} else {
|
||||||
return panel.URL.path.UTF8String;
|
return panel.URL.path.UTF8String;
|
||||||
|
@ -118,7 +119,7 @@ namespace OpenRCT2 { namespace Ui
|
||||||
panel.canChooseFiles = false;
|
panel.canChooseFiles = false;
|
||||||
panel.canChooseDirectories = true;
|
panel.canChooseDirectories = true;
|
||||||
panel.allowsMultipleSelection = false;
|
panel.allowsMultipleSelection = false;
|
||||||
if ([panel runModal] == NSFileHandlingPanelOKButton)
|
if ([panel runModal] == NSModalResponseOK)
|
||||||
{
|
{
|
||||||
NSString *selectedPath = panel.URL.path;
|
NSString *selectedPath = panel.URL.path;
|
||||||
const char *path = selectedPath.UTF8String;
|
const char *path = selectedPath.UTF8String;
|
||||||
|
|
Loading…
Reference in New Issue