Pause and resume sounds when pausing game

This commit is contained in:
2025-06-02 12:43:37 +01:00
parent 6706ac494a
commit 1851dcc5d6
8 changed files with 74 additions and 63 deletions
+6 -7
View File
@@ -1,12 +1,11 @@
module Preload
( cleanUpPreload
)
where
module Preload (
cleanUpPreload,
) where
import Data.Preload
import Preload.Render
import Sound.Data
import qualified SDL.Mixer as Mix
import Sound.Data
cleanUpPreload :: PreloadData -> IO ()
cleanUpPreload pd = do
@@ -14,4 +13,4 @@ cleanUpPreload pd = do
cleanUpSoundPreload $ _soundData pd
cleanUpSoundPreload :: SoundData -> IO ()
cleanUpSoundPreload _ = Mix.closeAudio
cleanUpSoundPreload _ = Mix.closeAudio >> putStrLn "Audio closed"