Ignore:
Timestamp:
Mar 3, 2010, 1:57:58 AM (9 years ago)
Author:
rme
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/examples/opengl-ffi.lisp

    r11990 r13474  
    129129  (eval-when (:compile-toplevel :execute)
    130130    (use-interface-dir :cocoa))
    131   ;; If the current (window system) process is visible (has a UI),
    132   ;; we can't possibly win.
    133   (rlet ((psn #>ProcessSerialNumber))
    134     (and (eql 0 (#_GetCurrentProcess psn))
    135          (not (eql #$false (#_IsProcessVisible psn)))
    136          (error "This is a GLUT example; it can't possibly work ~
    137                  in a GUI environment."))))
     131  ;; If the IDE appears to be running, complain about that.
     132  (if (ignore-errors (find-symbol "*NSAPP*" "GUI"))
     133    (error "This is a GLUT example; it can't possibly work ~
     134                 in a GUI environment.")))
    138135(progn
    139136  (ccl:process-run-function
Note: See TracChangeset for help on using the changeset viewer.