diff options
-rw-r--r-- | Demos/Pong/Main.hs | 1 | ||||
-rw-r--r-- | Spear/Window.hs | 2 |
2 files changed, 1 insertions, 2 deletions
diff --git a/Demos/Pong/Main.hs b/Demos/Pong/Main.hs index 0237a26..26ceefa 100644 --- a/Demos/Pong/Main.hs +++ b/Demos/Pong/Main.hs | |||
@@ -98,7 +98,6 @@ renderGO go = do | |||
98 | ,vec2 xmax ymax | 98 | ,vec2 xmax ymax |
99 | ,vec2 xmin ymax)] | 99 | ,vec2 xmin ymax)] |
100 | 100 | ||
101 | -- TODO: Fix the resize hang. | ||
102 | resize :: WindowEvent -> Game GameState () | 101 | resize :: WindowEvent -> Game GameState () |
103 | resize (ResizeEvent w h) = | 102 | resize (ResizeEvent w h) = |
104 | let r = fromIntegral w / fromIntegral h | 103 | let r = fromIntegral w / fromIntegral h |
diff --git a/Spear/Window.hs b/Spear/Window.hs index 3cdc5f5..aafcb59 100644 --- a/Spear/Window.hs +++ b/Spear/Window.hs | |||
@@ -178,7 +178,7 @@ onWindowClose closeRequest window = putMVar closeRequest True | |||
178 | -- the last in a poll can be ignored, we just replace the contents of the mvar | 178 | -- the last in a poll can be ignored, we just replace the contents of the mvar |
179 | -- here instead of adding the event to the list. | 179 | -- here instead of adding the event to the list. |
180 | onResize :: MVar [WindowEvent] -> GLFW.WindowSizeCallback | 180 | onResize :: MVar [WindowEvent] -> GLFW.WindowSizeCallback |
181 | onResize windowEvents window w h = putMVar windowEvents [ResizeEvent w h] | 181 | onResize windowEvents window w h = modifyMVar_ windowEvents (return <$> const [ResizeEvent w h]) |
182 | 182 | ||
183 | onKey :: MVar [InputEvent] -> GLFW.KeyCallback | 183 | onKey :: MVar [InputEvent] -> GLFW.KeyCallback |
184 | onKey events window key _ GLFW.KeyState'Pressed _ = addEvent events $ KeyDown (fromGLFWkey key) | 184 | onKey events window key _ GLFW.KeyState'Pressed _ = addEvent events $ KeyDown (fromGLFWkey key) |