MacOS fixes

This fixes an issue where Con::getVariable can't be used in the global scope before the console system is initialized. I'm honestly surprised this error didn't happen on any other platform.
This commit is contained in:
Jeff Hutchinson 2021-08-21 20:48:26 -04:00
parent c04f3ae166
commit 37dc8626f5
3 changed files with 9 additions and 3 deletions

View file

@ -52,7 +52,7 @@
//-----------------------------------------------------------------------------
StringTableEntry ImageAsset::smNoImageAssetFallback(StringTable->insert(Con::getVariable("$Core::NoImageAssetFallback")));
StringTableEntry ImageAsset::smNoImageAssetFallback = NULL;
//-----------------------------------------------------------------------------
@ -147,6 +147,8 @@ void ImageAsset::consoleInit()
Con::addVariable("$Core::NoImageAssetFallback", TypeString, &smNoImageAssetFallback,
"The assetId of the texture to display when the requested image asset is missing.\n"
"@ingroup GFX\n");
smNoImageAssetFallback = StringTable->insert(Con::getVariable("$Core::NoImageAssetFallback"));
}
//-----------------------------------------------------------------------------