Don't call flipToPage1 until renderer is loaded.

This commit is contained in:
Martin Haye 2020-06-05 13:18:16 -07:00
parent 9e93360d11
commit ccd7f269b1

View File

@ -2142,8 +2142,9 @@ end
///////////////////////////////////////////////////////////////////////////////////////////////////
export def textureControl(flg)#0
if renderLoaded
flipToPage1
if flg <> texturesLoaded and renderLoaded
if flg <> texturesLoaded
if flg
_texControl(1)
if mapIs3D; loadUtil3d; fin
@ -2159,6 +2160,9 @@ export def textureControl(flg)#0
fin
fin
texturesLoaded = flg
else
texturesLoaded = FALSE
fin
end
///////////////////////////////////////////////////////////////////////////////////////////////////
@ -2762,7 +2766,7 @@ export def callGlobalFunc(moduleNum, arg1, arg2, arg3)#1
word pModule, pFunc, ret
// First load the module
flipToPage1()
if renderLoaded; flipToPage1(); fin
mmgr(START_LOAD, 1) // code is in partition 1
pModule = mmgr(QUEUE_LOAD, moduleNum<<8 | RES_TYPE_MODULE)
mmgr(FINISH_LOAD, 0)