Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 3 additions & 5 deletions src/Rumpus/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -117,11 +117,9 @@ multiThreadedLoop ghc pd vrPal = do
makeContextCurrent (Just (gpThreadWindow vrPal))
void . flip runStateT startingECS . forever $ do
(headM44, events) <- atomically $ do
readTVar backgroundBox >>= \case
Just something -> do
writeTVar backgroundBox Nothing
return something
Nothing -> retry
+ something <- fmap (fromJustNote "asum . repeat") $ asum $ repeat $ readTVar backgroundBox
+ writeTVar backgroundBox Nothing
+ return something

profile "Controls" $ tickControlEventsSystem headM44 events
tickLogic
Expand Down