racket/gui cocoa: fix for Mac OS X before 10.7
I forgot to guard a NSScreen method called for Retina support with a version check.
This commit is contained in:
parent
8323e679eb
commit
b64f74bbed
|
@ -110,6 +110,7 @@
|
||||||
(tellv ctx restoreGraphicsState)))
|
(tellv ctx restoreGraphicsState)))
|
||||||
|
|
||||||
(define (display-bitmap-resolution num fail)
|
(define (display-bitmap-resolution num fail)
|
||||||
|
(if (version-10.7-or-later?)
|
||||||
(let ([r (atomically
|
(let ([r (atomically
|
||||||
(with-autorelease
|
(with-autorelease
|
||||||
(let ([s (if (zero? num)
|
(let ([s (if (zero? num)
|
||||||
|
@ -123,7 +124,8 @@
|
||||||
(cond
|
(cond
|
||||||
[(not r) (fail)]
|
[(not r) (fail)]
|
||||||
[(zero? r) 1.0]
|
[(zero? r) 1.0]
|
||||||
[else r])))
|
[else r]))
|
||||||
|
1.0))
|
||||||
|
|
||||||
(define/top (make-screen-bitmap [exact-positive-integer? w]
|
(define/top (make-screen-bitmap [exact-positive-integer? w]
|
||||||
[exact-positive-integer? h])
|
[exact-positive-integer? h])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user