in game-worlds, open game-input before starting game-loop and close after. otherwise there's a chance the game-loop might tick without game-input available

db4
Joe Groff 2009-05-13 19:35:46 -05:00
parent 0483a5044a
commit 575b0645a3
1 changed files with 6 additions and 6 deletions

View File

@ -12,12 +12,12 @@ M: game-world draw*
swap >>tick-slice draw-world ;
M: game-world begin-world
open-game-input
dup [ tick-length ] [ ] bi <game-loop> [ >>game-loop ] keep start-loop
drop
open-game-input ;
M: game-world end-world
close-game-input
[ [ stop-loop ] when* f ] change-game-loop
drop ;
M: game-world end-world
[ [ stop-loop ] when* f ] change-game-loop
close-game-input
drop ;