ibis/src/Util.hs

44 lines
762 B
Haskell
Raw Normal View History

2019-01-29 22:55:45 +00:00
module Util where
import qualified SDL
import Options.Applicative
2019-01-30 05:08:38 +00:00
import System.IO
2019-01-29 22:55:45 +00:00
-- internal imports
import Types
glWindowConfig :: SDL.WindowConfig
glWindowConfig = SDL.defaultWindow
{ SDL.windowOpenGL = Just SDL.defaultOpenGL
{ SDL.glProfile = SDL.Core SDL.Normal 3 3
}
}
2019-01-30 05:08:38 +00:00
putErrLn :: String -> IO ()
putErrLn s = hputStrLn stderr s
2019-01-29 22:55:45 +00:00
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"
)
2019-01-30 05:08:38 +00:00
-- makeWindowConfig :: SDL.Display -> SDL.WindowConfig
-- makeWindowConfig d =