extra/cap: if the GL scale is 2, actually enable 2x

factor-shell
Cat Stevens 2018-01-04 18:26:39 -05:00 committed by John Benediktsson
parent e269f78597
commit b436d4af96
1 changed files with 4 additions and 1 deletions

View 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