]> code.delx.au - gnu-emacs/blobdiff - src/nsimage.m
Fix warnings on OSX 10.10.
[gnu-emacs] / src / nsimage.m
index 3e90226cbf63d8ee77eb51f203a37741333e255c..4d01419edf901404bd518273cf7870647d2645d7 100644 (file)
@@ -187,7 +187,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
 
   /* The next two lines cause the DPI of the image to be ignored.
      This seems to be the behavior users expect. */
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
   [image setScalesWhenResized: YES];
+#endif
+#endif
   [image setSize: NSMakeSize([imgRep pixelsWide], [imgRep pixelsHigh])];
 
   [image setName: [NSString stringWithUTF8String: SSDATA (file)]];
@@ -353,7 +357,11 @@ ns_set_alpha (void *img, int x, int y, unsigned char a)
 
           /* The next two lines cause the DPI of the image to be ignored.
              This seems to be the behavior users expect. */
+#ifdef NS_IMPL_COCOA
+#if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_6
           [self setScalesWhenResized: YES];
+#endif
+#endif
           [self setSize: NSMakeSize([bmr pixelsWide], [bmr pixelsHigh])];
 
           break;