Complain visibly when cannot load GL shared libs, instead of swallowing error.

original commit: 38fffd35825b7d7e1fad5a430fc905240d2596e5
This commit is contained in:
Tony Garnock-Jones 2013-04-18 12:39:30 -04:00 committed by Matthew Flatt
parent 475b2cd1a7
commit 4c02357562

View File

@ -16,12 +16,15 @@
get-gdk-pixmap
install-gl-context))
(define gdkglext-lib
(with-handlers ([exn:fail? (lambda (exn) #f)])
(ffi-lib "libgdkglext-x11-1.0" '("0"))))
(define gtkglext-lib
(with-handlers ([exn:fail? (lambda (exn) #f)])
(ffi-lib "libgtkglext-x11-1.0" '("0"))))
(define (ffi-lib/complaint-on-failure name vers)
(ffi-lib name vers
#:fail (lambda ()
(log-warning "could not load GL library ~a ~a"
name vers)
#f)))
(define gdkglext-lib (ffi-lib/complaint-on-failure "libgdkglext-x11-1.0" '("0")))
(define gtkglext-lib (ffi-lib/complaint-on-failure "libgtkglext-x11-1.0" '("0")))
(define-ffi-definer define-gdkglext gdkglext-lib
#:default-make-fail make-not-available)