]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/corefoundation/stdpaths_cf.cpp
corrected GetKeyInfo() (bug 1815516)
[wxWidgets.git] / src / mac / corefoundation / stdpaths_cf.cpp
index 12c4e3db0467c63f1d6983147db92190cf16142e..f8cf48355a0e118d378c02458134914f4698ab48 100644 (file)
@@ -151,13 +151,15 @@ wxString wxStandardPathsCF::GetDataDir() const
     return GetFromFunc(CFBundleCopySharedSupportURL);
 }
 
+// TODO: implement this using real CoreFoundation API instead of Carbon API
 wxString wxStandardPathsCF::GetExecutablePath() const
 {
+#ifdef __WXMAC__
     ProcessInfoRec processinfo;
     ProcessSerialNumber procno ;
     FSSpec fsSpec;
 
-    procno.highLongOfPSN = NULL ;
+    procno.highLongOfPSN = 0 ;
     procno.lowLongOfPSN = kCurrentProcess ;
     processinfo.processInfoLength = sizeof(ProcessInfoRec);
     processinfo.processName = NULL;
@@ -165,6 +167,9 @@ wxString wxStandardPathsCF::GetExecutablePath() const
 
     GetProcessInformation( &procno , &processinfo ) ;
     return wxMacFSSpec2MacFilename(&fsSpec);
+#else
+    return wxStandardPathsBase::GetExecutablePath();
+#endif
 }
 
 wxString wxStandardPathsCF::GetLocalDataDir() const
@@ -196,7 +201,7 @@ wxString wxStandardPathsCF::GetResourcesDir() const
 }
 
 wxString
-wxStandardPathsCF::GetLocalizedResourcesDir(const wxChar *lang,
+wxStandardPathsCF::GetLocalizedResourcesDir(const wxString& lang,
                                             ResourceCat category) const
 {
     return wxStandardPathsBase::