diff options
| author | Akshay Nair <phenax5@gmail.com> | 2024-12-26 21:48:01 +0530 |
|---|---|---|
| committer | Akshay Nair <phenax5@gmail.com> | 2024-12-26 21:48:01 +0530 |
| commit | 2819868eb398ebe7da0e59391367e5825f8fe2c5 (patch) | |
| tree | 7c684f23487cc39132b8099205791ef3f9a1bad1 /src/Chelleport/AppShell.hs | |
| parent | 7dfa0f2866ea6d3441c6c343d841e969aa2ea77d (diff) | |
| download | chelleport-2819868eb398ebe7da0e59391367e5825f8fe2c5.tar.gz chelleport-2819868eb398ebe7da0e59391367e5825f8fe2c5.zip | |
Minor refactoring
Diffstat (limited to 'src/Chelleport/AppShell.hs')
| -rw-r--r-- | src/Chelleport/AppShell.hs | 8 |
1 files changed, 4 insertions, 4 deletions
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) |
