diff --git a/affection.cabal b/affection.cabal index 0dee209..e177d91 100644 --- a/affection.cabal +++ b/affection.cabal @@ -49,7 +49,7 @@ library hs-source-dirs: src default-language: Haskell2010 -- Other library packages from which modules are imported. - build-depends: base >=4.8 && <4.9 + build-depends: base >=4.9 && <4.10 , sdl2 , text , linear diff --git a/src/Affection.hs b/src/Affection.hs index 3263691..0ea48b9 100644 --- a/src/Affection.hs +++ b/src/Affection.hs @@ -23,8 +23,12 @@ withAllAffection ops = do withWindow :: Monad m => Text -> WindowConfig -> RendererConfig -> RenderT m a -> IO () withWindow title wconf rconf ops = do window <- createWindow title wconf + -- I don't need a renderer here, i need a surface renderer <- createRenderer window (-1) rconf + surface <- getWindowSurface window gegl_init + -- I think I need some AffectionT or someting similar here and not a RenderT + -- from SDL. inRender renderer $ ops gegl_exit destroyWindow window