[Openmcl-cvs-notifications] r13474 - /trunk/source/examples/opengl-ffi.lisp

rme at clozure.com rme at clozure.com
Wed Mar 3 01:57:58 UTC 2010


Author: rme
Date: Tue Mar  2 19:57:58 2010
New Revision: 13474

Log:
Make this example work again.

#_IsProcessVisible seems to be returning 1 even if the IDE is not
running (at least on Snow Leopard), so just use a dopey heuristic
test instead.

Modified:
    trunk/source/examples/opengl-ffi.lisp

Modified: trunk/source/examples/opengl-ffi.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/examples/opengl-ffi.lisp (original)
+++ trunk/source/examples/opengl-ffi.lisp Tue Mar  2 19:57:58 2010
@@ -128,13 +128,10 @@
 (progn
   (eval-when (:compile-toplevel :execute)
     (use-interface-dir :cocoa))
-  ;; If the current (window system) process is visible (has a UI),
-  ;; we can't possibly win.
-  (rlet ((psn #>ProcessSerialNumber))
-    (and (eql 0 (#_GetCurrentProcess psn))
-         (not (eql #$false (#_IsProcessVisible psn)))
-         (error "This is a GLUT example; it can't possibly work ~
-                 in a GUI environment."))))
+  ;; If the IDE appears to be running, complain about that.
+  (if (ignore-errors (find-symbol "*NSAPP*" "GUI"))
+    (error "This is a GLUT example; it can't possibly work ~
+                 in a GUI environment.")))
 (progn
   (ccl:process-run-function
    "housekeeping"



More information about the Openmcl-cvs-notifications mailing list