Skip to content

Commit

Permalink
detection of input type in conf file now is a case special form
Browse files Browse the repository at this point in the history
  • Loading branch information
osune committed Mar 23, 2016
1 parent c40150c commit 6a592d4
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions midijoystick.scm
Original file line number Diff line number Diff line change
Expand Up @@ -162,9 +162,10 @@ struct js_event input_event;
(define (make-entry entry)
(let* ((id (car entry))
(command-bindings (cdr entry))
(t (cond ((equal? (car id) 'a) *JS-EVENT-AXIS*)
((equal? (car id) 'b) *JS-EVENT-BUTTON*)
(else #f)))
(t (case (car id)
((a A axis Axis) *JS-EVENT-AXIS* )
((b B button Button) *JS-EVENT-BUTTON*)
(else #f)))
(i (cadr id)))
;; (display command-bindings) (newline)
(if (equal? t #f) (begin (display "failed to parse line: ") (display entry) (newline))
Expand Down

0 comments on commit 6a592d4

Please sign in to comment.