]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/utils.cpp
changed processing of events to only process the events that were logged when enterin...
[wxWidgets.git] / src / mac / carbon / utils.cpp
index 95efb40dbbc4e9ab71977b0219cb46454c643006..066f36c368f3b962eb112ac4c8b82961fdf3095d 100644 (file)
 #include "MoreFiles.h"
 #include "MoreFilesExtras.h"
 
+#ifndef __DARWIN__
+#include <Threads.h>
+#include <Sound.h>
+#endif
+
 #ifndef __DARWIN__
 // defined in unix/utilsunx.cpp for Mac OS X
 
@@ -190,11 +195,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)