packages feed

dx9d3d 0.1.0.1 → 0.1.0.2

raw patch · 2 files changed

+6/−5 lines, 2 files

Files

DirectX9/D3D/Utility/Init.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE ScopedTypeVariables #-}
 module DirectX9.D3D.Utility.Init
 where
 import Graphics.Win32   ( WindowClosure, HWND, mkClassName, loadIcon
@@ -11,8 +12,8 @@                         , wM_QUIT, wM_KEYDOWN, vK_ESCAPE )
 import System.Win32.DLL ( getModuleHandle )
 import Control.Concurrent   ( newEmptyMVar, putMVar, takeMVar, tryTakeMVar, forkIO )
--- import Control.Exception ( catch )
--- import Prelude hiding ( catch )
+import Control.Exception ( catch, IOException )
+import Prelude hiding    ( catch )
 
 makeWindow :: Int -> Int -> String -> WindowClosure -> IO HWND
 makeWindow width height name proc = do
@@ -53,7 +54,7 @@     quit    <- newEmptyMVar
     forkIO $ catch
         (render signal quit 1)
-        (\e -> do
+        (\(e::IOException) -> do
             print e
             putMVar quit ())
     loop signal quit
@@ -73,7 +74,7 @@                         translateMessage msg
                         dispatchMessage msg
                         return more)
-                    (const $ return False)
+                    (\(_::IOException) -> return False)
             if more
                 then loop signal quit
                 else do
dx9d3d.cabal view
@@ -1,5 +1,5 @@ name:               dx9d3d
-version:            0.1.0.1
+version:            0.1.0.2
 author:             Esa Ilari Vuokko
 maintainer:         none
 license:            BSD3