From 2819868eb398ebe7da0e59391367e5825f8fe2c5 Mon Sep 17 00:00:00 2001 From: Akshay Nair Date: Thu, 26 Dec 2024 21:48:01 +0530 Subject: Minor refactoring --- src/Chelleport/AppShell.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/Chelleport/AppShell.hs') diff --git a/src/Chelleport/AppShell.hs b/src/Chelleport/AppShell.hs index 2e95a85..d48e06b 100644 --- a/src/Chelleport/AppShell.hs +++ b/src/Chelleport/AppShell.hs @@ -20,13 +20,13 @@ instance (MonadIO m) => MonadAppShell (AppM m) where hideWindow = asks ctxWindow >>= SDL.hideWindow showWindow = asks ctxWindow >>= SDL.showWindow shutdownApp = do - DrawContext {ctxRenderer = renderer, ctxWindow = window, ctxX11Display = x11Display} <- ask - SDL.destroyRenderer renderer - SDL.destroyWindow window + ctx <- ask + SDL.destroyRenderer $ ctxRenderer ctx + SDL.destroyWindow $ ctxWindow ctx releaseMouseButton SDL.quit liftIO $ do - X11.closeDisplay x11Display + X11.closeDisplay $ ctxX11Display ctx exitSuccess type Update m state appAction = state -> appAction -> m (state, Maybe appAction) -- cgit v1.3.1