ibis/src/Util.hs

44 lines
762 B
Haskell

module Util where
import qualified SDL
import Options.Applicative
import System.IO
-- internal imports
import Types
glWindowConfig :: SDL.WindowConfig
glWindowConfig = SDL.defaultWindow
{ SDL.windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 3
}
}
putErrLn :: String -> IO ()
putErrLn s = hputStrLn stderr s
options :: Parser Options
options = Options
<$> switch
( long "fullscreen"
<> short 'f'
<> help "Toggle fullscreen"
<> showDefault
)
<*> switch
( long "flip"
<> short 'p'
<> help "Flip screens"
<> showDefault
)
<*> argument str
( help "Input file"
<> metavar "FILE"
)
-- makeWindowConfig :: SDL.Display -> SDL.WindowConfig
-- makeWindowConfig d =