From ee50719de81145b5859d957da722cf183e0c8c60 Mon Sep 17 00:00:00 2001 From: "Juan J. Martinez" Date: Thu, 9 Mar 2023 12:20:46 +0000 Subject: Use ALT + Enter to toggle fullscreen --- src/Game.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/Game.hs') diff --git a/src/Game.hs b/src/Game.hs index 2f9988d..52ba6a7 100644 --- a/src/Game.hs +++ b/src/Game.hs @@ -134,8 +134,11 @@ gameLoop :: Env -> IO () gameLoop e = do events <- map SDL.eventPayload <$> SDL.pollEvents - -- F11 for fullscreen / windowed - env <- if fromMaybe False $ C.isPressed SDL.KeycodeF11 events then toggleFullscreen e else pure e + -- ALT + Enter for fullscreen / windowed + env <- + if fromMaybe False (C.isPressed SDL.KeycodeReturn events) && C.isModKey C.altMod events + then toggleFullscreen e + else pure e let renderer = env.renderer canvas = env.canvas -- cgit v1.2.3