Skip to content
Browse files

Fix fullscreenable from causing global C inits.

  • Loading branch information...
Shinmera committed Jul 20, 2019
1 parent a133cff commit bcacc138d601ef99c92258148e87a40c2dc628d6
Showing with 14 additions and 13 deletions.
  1. +0 −2 deploy.lisp
  2. +14 −11 fullscreenable.lisp
@@ -16,12 +16,10 @@
(setf *standalone* T))

(deploy:define-hook (:build trial) ()

(deploy:define-hook (:boot trial) ()
(setf *random-state* (make-random-state T)))

(deploy:define-library cl-opengl-bindings::opengl
@@ -8,19 +8,24 @@

(defclass fullscreenable (display)
((original-mode :initform NIL :accessor original-mode)
(resolution :accessor resolution)
(fullscreen :accessor fullscreen))
(resolution :initarg :resolution :accessor resolution)
(fullscreen :initarg :fullscreen :accessor fullscreen))
:resolution (list 800 600)
:fullscreen NIL))

(defmethod initialize-instance :after ((fullscreenable fullscreenable) &key resolution fullscreen)
(setf (original-mode fullscreenable) (cl-monitors:mode
(dolist (monitor (cl-monitors:detect))
(when (cl-monitors:primary-p monitor)
(return monitor)))))
(setf (resolution fullscreenable) resolution)
(setf (fullscreen fullscreenable) fullscreen))
(defmethod start :after ((fullscreenable fullscreenable))
(setf (original-mode fullscreenable)
(dolist (monitor (cl-monitors:detect))
(when (cl-monitors:primary-p monitor)
(return monitor)))))
(setf (resolution fullscreenable) (resolution fullscreenable))
(setf (fullscreen fullscreenable) (fullscreen fullscreenable)))

(defmethod stop :after ((fullscreenable fullscreenable))

(defmethod finalize :after ((fullscreenable fullscreenable))
(setf (resolution fullscreenable) NIL))
@@ -41,5 +46,3 @@

(defmethod (setf fullscreen) :before (fullscreen (fullscreenable fullscreenable))
(show (context fullscreenable) :fullscreen fullscreen))


0 comments on commit bcacc13

Please sign in to comment.
You can’t perform that action at this time.