diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index a44b081b5..b073ae0e9 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2714,9 +2714,9 @@ NSOpenGLPixelFormat* Fl_X::mode_to_NSOpenGLPixelFormat(int m, const int *alistp) //list[n++] = AGL_STEREO; attribs[n++] = NSOpenGLPFAStereo; } - if (m & FL_MULTISAMPLE) { + if ((m & FL_MULTISAMPLE) && fl_mac_os_version >= 100400) { #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 - attribs[n++] = NSOpenGLPFAMultisample, + attribs[n++] = NSOpenGLPFAMultisample, // 10.4 #endif attribs[n++] = NSOpenGLPFASampleBuffers; attribs[n++] = (NSOpenGLPixelFormatAttribute)1; attribs[n++] = NSOpenGLPFASamples; attribs[n++] = (NSOpenGLPixelFormatAttribute)4; @@ -4229,7 +4229,7 @@ static NSBitmapImageRep* rect_to_NSBitmapImageRep(Fl_Window *win, int x, int y, // if bitmap is high res and childbitmap is not, childbitmap must be rescaled if ([bitmap pixelsWide] > w && [childbitmap pixelsWide] == clip.size.width) childbitmap = scale_nsbitmapimagerep(childbitmap, 2); #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 - if ( ([bitmap bitmapFormat] & NSAlphaFirstBitmapFormat) && !([childbitmap bitmapFormat] & NSAlphaFirstBitmapFormat) ) { // 10.4 + if (fl_mac_os_version >= 100400 && ([bitmap bitmapFormat] & NSAlphaFirstBitmapFormat) && !([childbitmap bitmapFormat] & NSAlphaFirstBitmapFormat) ) { // 10.4 // bitmap is ARGB and childbitmap is RGBA --> convert childbitmap to ARGB too uchar *b = [childbitmap bitmapData]; for (int i = 0; i < [childbitmap pixelsHigh]; i++) { @@ -4266,7 +4266,7 @@ unsigned char *Fl_X::bitmap_from_window_rect(Fl_Window *win, int x, int y, int w int hh = bpp/bpr; // sometimes hh = h-1 for unclear reason, and hh = 2*h with retina int ww = bpr/(*bytesPerPixel); // sometimes ww = w-1, and ww = 2*w with retina #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 - if ([bitmap bitmapFormat] & NSAlphaFirstBitmapFormat) { // imagerep is ARGB --> convert it to RGBA + if (fl_mac_os_version >= 100400 && ([bitmap bitmapFormat] & NSAlphaFirstBitmapFormat)) { // imagerep is ARGB --> convert it to RGBA uchar *b = [bitmap bitmapData]; for (int i = 0; i < hh; i++) { for (int j = 0; j < ww; j++) { |
