game.loop: Fix throwing errors inside game loop.

db4
Doug Coleman 2013-06-18 16:24:05 -07:00
parent 4df945e3db
commit 75dccbe329
1 changed files with 3 additions and 3 deletions

View File

@ -21,13 +21,13 @@ GENERIC: draw* ( tick-slice delegate -- )
DEFER: stop-loop
TUPLE: game-loop-error-state game-loop error ;
TUPLE: game-loop-error-state error game-loop ;
: ?ui-error ( error -- )
ui-running? [ ui-error ] [ rethrow ] if ;
: game-loop-error ( game-loop error -- )
[ drop stop-loop ] [ \ game-loop-error-state boa ?ui-error ] 2bi ;
: game-loop-error ( error game-loop -- )
[ nip stop-loop ] [ \ game-loop-error-state boa ?ui-error ] 2bi ;
: fps ( fps -- nanos )
[ 1,000,000,000 ] dip /i ; inline