X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8bb6b2c057edbcc5b87f00a8af6ac70f6fd69727..1f5cf9cc23f7763e9ee7984b171bb4b6a3ce3ffb:/src/mac/carbon/utils.cpp?ds=sidebyside diff --git a/src/mac/carbon/utils.cpp b/src/mac/carbon/utils.cpp index 54913b5d00..240161a190 100644 --- a/src/mac/carbon/utils.cpp +++ b/src/mac/carbon/utils.cpp @@ -67,24 +67,20 @@ #endif #endif -// --------------------------------------------------------------------------- -// code used in both base and GUI compilation -// --------------------------------------------------------------------------- +#if wxUSE_BASE // our OS version is the same in non GUI and GUI cases -wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) +wxOperatingSystemId wxGetOsVersion(int *majorVsn, int *minorVsn) { long theSystem; - - // are there x-platform conventions ? - Gestalt(gestaltSystemVersion, &theSystem); - if (minorVsn != NULL) - *minorVsn = (theSystem & 0xFF); - if (majorVsn != NULL) + if ( majorVsn != NULL ) *majorVsn = (theSystem >> 8); + if ( minorVsn != NULL ) + *minorVsn = (theSystem & 0xFF); + #if defined( __DARWIN__ ) return wxOS_MAC_OSX_DARWIN; #else @@ -92,10 +88,6 @@ wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin) #endif } - - -#if wxUSE_BASE - // ---------------------------------------------------------------------------- // debugging support // ----------------------------------------------------------------------------