Fix: Don't rely on static initialization to set up sprite font caches.

The order of static initialization is undefined, so this can cause initalization
before relevant caches are initializations.

(cherry picked from commit f454ec8d63)
This commit is contained in:
Peter Nelson
2023-05-17 14:54:14 +01:00
committed by Jonathan G Rennison
parent dd94b087c4
commit b505805bfe
2 changed files with 13 additions and 1 deletions

View File

@@ -37,6 +37,8 @@ public:
FontCache(FontSize fs);
virtual ~FontCache();
static void InitializeFontCaches();
static int GetDefaultFontHeight(FontSize fs);
/**