diff --git a/src/xswiftbus/main.cpp b/src/xswiftbus/main.cpp index bbcdb1519..89d79ad75 100644 --- a/src/xswiftbus/main.cpp +++ b/src/xswiftbus/main.cpp @@ -36,6 +36,11 @@ XSwiftBus::CPlugin *g_plugin; PLUGIN_API int XPluginStart(char *o_name, char *o_sig, char *o_desc) { +#if APL + // https://developer.x-plane.com/2014/12/mac-plugin-developers-you-should-be-using-native-paths/ + XPLMEnableFeature("XPLM_USE_NATIVE_PATHS",1); +#endif + std::strcpy(o_name, "XSwiftBus"); std::strcpy(o_sig, "org.swift-project.xswiftbus"); std::strcpy(o_desc, "Allows swift to connect to X-Plane via D-Bus IPC"); diff --git a/src/xswiftbus/utils.cpp b/src/xswiftbus/utils.cpp index 27fe35cc9..56a692905 100644 --- a/src/xswiftbus/utils.cpp +++ b/src/xswiftbus/utils.cpp @@ -32,7 +32,10 @@ namespace XSwiftBus char xplanePath[512]; XPLMGetSystemPath(xplanePath); #ifdef Q_OS_MAC - HFS2PosixPath(xplanePath, xplanePath, sizeof(xplanePath)); + if (XPLMIsFeatureEnabled("XPLM_USE_NATIVE_PATHS") == 0) + { + HFS2PosixPath(xplanePath, xplanePath, sizeof(xplanePath)); + } g_sep = "/"; #else g_sep = XPLMGetDirectorySeparator();