no need to empty already empty MVars
This commit is contained in:
parent
9cd2ca9298
commit
8f5ea5531c
1 changed files with 0 additions and 2 deletions
|
@ -166,12 +166,10 @@ sceneSwitch curScene evs = mapM_ (switch . SDL.eventPayload) evs
|
||||||
SDL.KeycodeF1 -> do
|
SDL.KeycodeF1 -> do
|
||||||
isEmpty <- isEmptyMVar curScene
|
isEmpty <- isEmptyMVar curScene
|
||||||
when isEmpty $ do
|
when isEmpty $ do
|
||||||
void $ tryTakeMVar curScene
|
|
||||||
putMVar curScene =<< fmap Scene (initScene @ClearColor)
|
putMVar curScene =<< fmap Scene (initScene @ClearColor)
|
||||||
SDL.KeycodeF2 -> do
|
SDL.KeycodeF2 -> do
|
||||||
isEmpty <- isEmptyMVar curScene
|
isEmpty <- isEmptyMVar curScene
|
||||||
when isEmpty $ do
|
when isEmpty $ do
|
||||||
void $ tryTakeMVar curScene
|
|
||||||
putMVar curScene =<< fmap Scene (initScene @Texture2D)
|
putMVar curScene =<< fmap Scene (initScene @Texture2D)
|
||||||
_ ->
|
_ ->
|
||||||
return ()
|
return ()
|
||||||
|
|
Loading…
Reference in a new issue