Permalink
Browse files

Minor fixes.

  • Loading branch information...
Shinmera committed Nov 27, 2017
1 parent ae090f9 commit ca2ba94b8bb2814e10b4b950fd65f17c928da67e
Showing with 10 additions and 6 deletions.
  1. +0 −1 backends/glfw/context.lisp
  2. +7 −2 backends/glop/context.lisp
  3. +1 −1 backends/qt/input-tables.lisp
  4. +2 −2 formats/vertex-format.lisp
@@ -286,7 +286,6 @@
(:8 :x5)
(T button)))
;; FIXME: match keys up with glop backend
(defun glfw-key->key (key)
(case key
(:grave-accent :section)
@@ -198,7 +198,7 @@
(pushnew :super (modifiers context)))
((:hyper-l :hyper-r)
(pushnew :hyper (modifiers context))))
(handle (make-instance 'key-press :key (glop:keysym event)
(handle (make-instance 'key-press :key (glop-key->key (glop:keysym event))
:modifiers (modifiers context))
(handler context)))
(glop:key-release-event
@@ -214,7 +214,7 @@
(setf (modifiers context) (delete :super (modifiers context))))
((:hyper-l :hyper-r)
(setf (modifiers context) (delete :hyper (modifiers context)))))
(handle (make-instance 'key-release :key (glop:keysym event)
(handle (make-instance 'key-release :key (glop-key->key (glop:keysym event))
:modifiers (modifiers context))
(handler context))
(when (and (glop:text event) (string/= "" (glop:text event)))
@@ -270,6 +270,11 @@
(when (closing context)
(throw 'escape NIL)))
;; FIXME: match this up with the GLFW backend.
(defun glop-key->key (key)
(case key
(T key)))
(defun glop-button->symbol (button)
(case button
(1 :left)
@@ -6,7 +6,7 @@
(in-package #:org.shirakumo.fraf.trial.qt)
;; FIXME: match this up with the glop backend.
;; FIXME: match this up with the GLFW backend.
(defparameter *key-table*
(alexandria:alist-hash-table
'((#x01000000 . :escape)
@@ -124,7 +124,8 @@
(vformat-write-float buffer (vz4 value))
(vformat-write-float buffer (vw4 value)))
((integer fixnum)
;; FIXME check containment
(unless (< value (expt 2 32))
(error "Cannot write an integer bigger than 32 bits."))
(fast-io:write32-le value buffer))
(single-float
(vformat-write-float buffer value))
@@ -150,7 +151,6 @@
(vformat-read-float buffer)
(vformat-read-float buffer)))
((integer fixnum)
;; FIXME check containment
(fast-io:read32-le buffer))
(single-float
(vformat-read-float buffer))

0 comments on commit ca2ba94

Please sign in to comment.