]> gitweb.factorcode.org Git - factor.git/commitdiff
extra/cap: if the GL scale is 2, actually enable 2x
authorCat Stevens <catb0t@protonmail.ch>
Thu, 4 Jan 2018 23:26:39 +0000 (18:26 -0500)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 5 Jan 2018 04:30:54 +0000 (20:30 -0800)
extra/cap/cap.factor

index 5086939f4bb2cf51c90deced730ef51d4071acdd..15ae746e24ee89a19fc71869aa5e0a6c77aa9b57 100644 (file)
@@ -24,7 +24,10 @@ IN: cap
     [ glReadPixels ] keep ;
 
 : screenshot ( window -- bitmap )
-    [ <image> gl-scale-factor get-global [ >>2x? ] when* ] dip
+    [ <image>
+        gl-scale-factor get-global
+        [ >integer 2 = [ >>2x? ] when* ] when*
+    ] dip
     [ gl-screenshot >>bitmap ]
     [ dim>> [ gl-scale >fixnum ] map >>dim ] bi
     ubyte-components >>component-type