Author: wmb Date: 2009-08-25 00:57:53 +0200 (Tue, 25 Aug 2009) New Revision: 1323
Modified: ofw/core/muxdev.fth ofw/gui/ofpong.fth Log: Via - install-alarm before games so sound eventually stops.
Modified: ofw/core/muxdev.fth =================================================================== --- ofw/core/muxdev.fth 2009-08-24 22:55:47 UTC (rev 1322) +++ ofw/core/muxdev.fth 2009-08-24 22:57:53 UTC (rev 1323) @@ -154,7 +154,8 @@ screen open-dev to screen-ih screen-ih add-mux
- keyboard open-dev add-mux + keyboard open-dev to keyboard-ih + keyboard-ih add-mux
mux-ih set-stdin mux-ih set-stdout
Modified: ofw/gui/ofpong.fth =================================================================== --- ofw/gui/ofpong.fth 2009-08-24 22:55:47 UTC (rev 1322) +++ ofw/gui/ofpong.fth 2009-08-24 22:57:53 UTC (rev 1323) @@ -269,10 +269,15 @@ [ifdef] olpc \ This works with the FirmWorks pckbd driver. The key map below \ is good for the OLPC keyboard. +[ifdef] keyboard-ih +alias pong-ih keyboard-ih +[else] +: pong-ih stdin @ ; +[then] + : initkeys ." Shift, Hand, Esc, Square" cr d# 3000 ms - " stdin @ iselect ' get-scan 0 alarm iunselect" eval false to key_left_up false to key_left_down false to key_right_up @@ -281,11 +286,10 @@ false to key_off ; : restorekeys - " stdin @ iselect ' get-scan d# 10 alarm iunselect" eval ; 0 value e0-seen? : scankeys - begin " get-data?" stdin @ $call-method while ( scancode ) + begin 0 " get-scancode" pong-ih $call-method while ( scancode ) dup h# e0 = if drop true to e0-seen? else
openfirmware@openfirmware.info