From http://www.jwz.org/xscreensaver/xscreensaver-5.38.tar.gz
[xscreensaver] / OSX / XScreenSaverGLView.m
index d61964f8d3b3fd0dad5fd909ecc3938c5b6be79b..57b0c7c74b8c57351af4d050b4518b860eb13af7 100644 (file)
@@ -1,4 +1,4 @@
-/* xscreensaver, Copyright (c) 2006-2016 Jamie Zawinski <jwz@jwz.org>
+/* xscreensaver, Copyright (c) 2006-2017 Jamie Zawinski <jwz@jwz.org>
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
  * documentation for any purpose is hereby granted without fee, provided that
@@ -41,14 +41,19 @@ extern void check_gl_error (const char *type);
 @implementation XScreenSaverGLView
 
 
-#ifdef USE_IPHONE
 /* With GL programs, drawing at full resolution isn't a problem.
  */
 - (CGFloat) hackedContentScaleFactor
 {
+# ifdef USE_IPHONE
   return [self contentScaleFactor];
+# else
+  return self.window.backingScaleFactor;
+# endif
 }
 
+# ifdef USE_IPHONE
+
 - (BOOL)ignoreRotation
 {
   return FALSE;                // Allow xwindow and the glViewport to change shape