X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/e7e1b01eb55e59e555860c7ce181f176b8bbf4e2..fa1c12bdd76acc21ddb45b90bb53b2f58aed946d:/src/mac/carbon/utils.cpp diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 95efb40dbb..41da489e3b 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -190,11 +190,22 @@ void wxBell() int wxGetOsVersion(int *majorVsn, int *minorVsn) { - long theSystem ; - Gestalt(gestaltSystemVersion, &theSystem) ; - *minorVsn = (theSystem & 0xFF ) ; - *majorVsn = (theSystem >> 8 ) ; // are there x-platform conventions ? - return wxMACINTOSH; + long theSystem ; + + // are there x-platform conventions ? + + Gestalt(gestaltSystemVersion, &theSystem) ; + if (minorVsn != NULL) { + *minorVsn = (theSystem & 0xFF ) ; + } + if (majorVsn != NULL) { + *majorVsn = (theSystem >> 8 ) ; + } +#ifdef __DARWIN__ + return wxMAC_DARWIN; +#else + return wxMAC; +#endif } // Reading and writing resources (eg WIN.INI, .Xdefaults)