]> gitweb.factorcode.org Git - factor.git/commitdiff
draw-world can't be called directly from a game loop; the ui update thread might...
authorJoe Groff <arcata@gmail.com>
Fri, 19 Jun 2009 03:33:09 +0000 (22:33 -0500)
committerJoe Groff <arcata@gmail.com>
Fri, 19 Jun 2009 03:33:09 +0000 (22:33 -0500)
extra/game-worlds/game-worlds.factor

index 2fb115b5d0d90651c944650f9fd4c6f4420828f4..542c48fbaeb9781c1d63bcb5f52085cd7ddc5995 100644 (file)
@@ -1,5 +1,5 @@
 USING: accessors game-input game-loop kernel math ui.gadgets
-ui.gadgets.worlds ui.gestures ;
+ui.gadgets.worlds ui.gestures threads ;
 IN: game-worlds
 
 TUPLE: game-world < world
@@ -9,7 +9,7 @@ TUPLE: game-world < world
 GENERIC: tick-length ( world -- millis )
 
 M: game-world draw*
-    swap >>tick-slice draw-world ;
+    swap >>tick-slice relayout-1 yield ;
 
 M: game-world begin-world
     open-game-input