don't duplicate main context
This commit is contained in:
parent
157158076f
commit
0f3c33b243
4 changed files with 2 additions and 4 deletions
|
@ -46,7 +46,6 @@ init = do
|
|||
, worldState = ws
|
||||
, stateData = None
|
||||
, threadContext = Nothing
|
||||
, mainContext = Nothing
|
||||
}
|
||||
|
||||
loadPlayerSprite
|
||||
|
|
|
@ -25,6 +25,7 @@ import Util
|
|||
|
||||
loadLoad :: Affection UserData ()
|
||||
loadLoad = do
|
||||
ad <- A.get
|
||||
ud <- getAffection
|
||||
progress <- liftIO $ newMVar 0
|
||||
future <- liftIO $ newEmptyMVar
|
||||
|
@ -38,7 +39,7 @@ loadLoad = do
|
|||
(nano ud)
|
||||
future
|
||||
progress
|
||||
SDL.glMakeCurrent (fromJust $ window ud) (fromJust $ mainContext ud)
|
||||
SDL.glMakeCurrent (fromJust $ window ud) (glContext ad)
|
||||
putAffection ud
|
||||
{ stateMVar = future
|
||||
, stateProgress = progress
|
||||
|
|
|
@ -57,7 +57,6 @@ pre = do
|
|||
_ <- partSubscribe w exitOnWindowClose
|
||||
putAffection ud
|
||||
{ threadContext = Just threadCtx
|
||||
, mainContext = Just (glContext ad)
|
||||
, window = Just (drawWindow ad)
|
||||
}
|
||||
|
||||
|
|
|
@ -37,7 +37,6 @@ data UserData = UserData
|
|||
, stateMVar :: MVar (SystemState Entity IO, StateData)
|
||||
, stateProgress :: MVar Float
|
||||
, threadContext :: Maybe SDL.GLContext
|
||||
, mainContext :: Maybe SDL.GLContext
|
||||
, window :: Maybe SDL.Window
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue