Skip to content

Commit

Permalink
Cursor locking
Browse files Browse the repository at this point in the history
  • Loading branch information
borodust committed Nov 22, 2016
1 parent dfed556 commit b089c42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
6 changes: 6 additions & 0 deletions host/system.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@


(defmethod execute ((this host-system) fn &optional priority)
(declare (ignore priority))
(with-slots (job-queue) this
(with-promise (resolve reject)
(with-system-lock-held (this)
Expand Down Expand Up @@ -147,3 +148,8 @@
(defun (setf viewport-title) (value host-sys)
(with-slots (window) host-sys
(glfw:set-window-title (format nil "~a" value) window)))


(defun lock-cursor (host)
(with-slots (window) host
(glfw:set-input-mode :cursor :disabled)))
1 change: 1 addition & 0 deletions packages.lisp
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@
bind-rendering-context
swap-buffers
viewport-title
lock-cursor

state-from
keyboard-event
Expand Down

0 comments on commit b089c42

Please sign in to comment.