diff --git a/src/Main.hs b/src/Main.hs index af117ba..bfa547e 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -71,6 +71,10 @@ quitGame (MsgKeyboardEvent _ _ SDL.Pressed False sym) | SDL.keysymKeycode sym == SDL.KeycodeEscape = do ad <- A.get ud <- getAffection + let Subsystem w m k = subsystems ud + mapM_ (partUnsubscribe w) (uuid ud) + mapM_ (partUnsubscribe m) (uuid ud) + mapM_ (partUnsubscribe k) (uuid ud) SDL.glMakeCurrent (drawWindow ad) (glContext ad) (ws, _) <- yieldSystemT (0, defStorage) (return ()) putAffection ud