Fix resize crash

This commit is contained in:
2023-03-24 14:21:12 +00:00
parent 000fcbc1c9
commit 20c05be23f
8 changed files with 99 additions and 60 deletions
+2 -4
View File
@@ -55,9 +55,7 @@ handleWindowMoveEvent mev =
handleResizeEvent :: WindowSizeChangedEventData -> Universe -> Universe
handleResizeEvent sev u =
u
& uvConfig . windowX .~ fromIntegral x
& uvConfig . windowY .~ fromIntegral y
-- & uvIOEffects %~ sideEffectUpdatePreload
& uvIOEffects %~ (updatePreload >=>)
& uvIOEffects %~ ( (updatePreload . updateconfig) >=>)
where
updateconfig = (uvConfig . windowX .~ fromIntegral x) . (uvConfig . windowY .~ fromIntegral y)
V2 x y = windowSizeChangedEventSize sev