anchor.diff:  	      (let ((h (sdl2:haptic-open-from-joystick joy)))
   		(setf *haptic* (acons i h *haptic*))
   		(sdl2:rumble-init h))))))
  -
     (format t "Controlers found: ~A~%" *controllers*))
   
   (defun uninit-controllers ()
  -  (format t "Closing opened game controllers.~%")
  -  (finish-output)
  +  (force-print t "Closing opened game controllers.~%")
     ;; close any game controllers that were opened
     ;; as well as any haptics
     (loop for (i . controller) in *controllers*
  
positive.code: 		(double-buffer t)
  		(hidden nil)
  		(resizable t))
  
    (unless *running*
      (let ((local-stdout *standard-output*)
  	  (local-input *standard-input*))
  
        (with-main
  
  	  (unless *inited*
  	    (sdl2:with-init (:everything)
  
  	      (let ((*standard-output* local-stdout)
  		    (*standard-input* local-input))
  
  		(setf *running* t)
  
  		(format t "Using SDL Library Version: ~D.~D.~D~%"
  			sdl2-ffi:+sdl-major-version+
  			sdl2-ffi:+sdl-minor-version+
  			sdl2-ffi:+sdl-patchlevel+)
  		(finish-output)
  		(when init-controllers (init-controllers))
  
  		(sdl2:with-window (win :w width :h height :title title
  				       :flags (remove nil `(:shown :opengl
  								   ,(when fullscreen :fullscreen-desktop)
  								   ,(when resizable :resizable)
  								   ,(when no-frame :borderless)
  								   ,(when hidden :hidden))))
  
  		  (when context-profile-mask (sdl2:gl-set-attr :context-profile-mask context-profile-mask))
  		  (when alpha-size (sdl2:gl-set-attr :alpha-size alpha-size))
  		  (when depth-size (sdl2:gl-set-attr :depth-size depth-size))
  		  (when stencil-size (sdl2:gl-set-attr :stencil-size stencil-size))
  		  (when red-size (sdl2:gl-set-attr :red-size red-size))
  		  (when green-size (sdl2:gl-set-attr :green-size green-size))
  		  (when blue-size (sdl2:gl-set-attr :blue-size blue-size))
  		  (when buffer-size (sdl2:gl-set-attr :buffer-size buffer-size))
  		  (sdl2:gl-set-attr :doublebuffer (if double-buffer 1 0))
  
  		  (setf *uncollected*
  		    #+(or ccl ecl) (make-hash-table :test 'eq)
  		    #-(or ccl ecl) (trivial-garbage:make-weak-hash-table :weakness :key-or-value))
  
  		  (setf *dependents*
  		    #+(or ccl ecl) (make-hash-table :test 'eq)
  		    #-(or ccl ecl) (trivial-garbage:make-weak-hash-table :weakness :key-or-value))
  
  		  (sdl2:with-gl-context (gl-context win)
  
  		    (setf *window* win
  			  *context* gl-context)
  
  		    (ensure-cepl-compatible-setup)
  		    (set-default-gl-options)
  
  		    ;; basic window/gl setup
  		    (format t "Setting up window/gl.~%")
  		    (finish-output)
  		    (sdl2:gl-make-current win gl-context)
  		    (gl:viewport 0 0 width height)
  		    (gl:clear :color-buffer)
  		    (format t "Beginning main loop.~%")
  		    (finish-output)
  
  		    (setf *entity* nil
  			  *texture* nil
  			  *ticks* (sdl2:get-ticks)
  			  *delta-ticks* *ticks*
  			  *root* (make-instance 'node :translation (v! 0 0 -100)))
  
  		    (main-loop win gl-context width height asynchronous)
  		    (unload-all-uncollected)
  		    (setf *root* nil
  			  *entity* nil
  			  *texture* nil
  			  *running* nil
  			  *inited* nil
  			  *generic-single-texture-shader* nil
  			  *generic-solid-phong-shader* nil
  			  *generic-single-diffuse-light-animation-shader* nil
  			  *generic-single-diffuse-light-shader* nil
  			  *generic-single-diffuse-light-per-vertex-color* nil
  			  *default-texture* nil))))))))))
  
  (defun uninit ()
    (with-main
        (setf *running* nil
  	    *inited* nil)
  
        (uninit-controllers)
      (sdl2:push-event :quit)))
  
negative.code:   (gl:depth-func :less)
    (gl:depth-range 0.0 1.0))
  
  (defmacro force-print (destination control-string &rest formal-arguments)
    `(progn
       (format ,destination ,control-string ,@formal-arguments)
       (force-output)))
  
  (defun print-sdl-version ()
    (force-print t "Using SDL Library Version: ~D.~D.~D~%"
                 sdl2-ffi:+sdl-major-version+
                 sdl2-ffi:+sdl-minor-version+
                 sdl2-ffi:+sdl-patchlevel+))
  
  (defun init-controllers ()
    (setf *controllers* nil
  	*haptic* nil)
  
    (force-print t "Opening game controllers. ~A ~%"
                 (sdl2-ffi.functions::sdl-game-controller-add-mappings-from-rw
                  (sdl2::sdl-rw-from-file
                   (concatenate 'string
                                (directory-namestring
                                 (asdf:system-relative-pathname :clinch "clinch.asd"))
                                "SDL_GameControllerDB/gamecontrollerdb.txt")
                   "rw") 1))
    ;; open any game controllers
    (loop for i from 0 upto (- (sdl2:joystick-count) 1)
       do (when (sdl2:game-controller-p i)
  	  (format t "Found gamecontroller: ~a~%"
  		  (sdl2:game-controller-name-for-index i))
  	  (let* ((gc (sdl2:game-controller-open i))
  		 (joy (sdl2:game-controller-get-joystick gc)))
  	    (setf *controllers* (acons i gc *controllers*))
  