1
0
mirror of https://github.com/luanti-org/luanti.git synced 2025-10-15 17:35:37 +02:00

Reload font manager in main thread to avoid a crash (#15900)

This commit is contained in:
Deve
2025-03-16 17:55:39 +01:00
committed by GitHub
parent 4b85062caf
commit c07499ccfc
4 changed files with 24 additions and 4 deletions

View File

@@ -121,6 +121,9 @@ public:
/** update internal parameters from settings */
void readSettings();
/** reload fonts if settings were changed */
void handleReload();
void setMediaFont(const std::string &name, const std::string &data);
void clearMediaFonts();
@@ -142,6 +145,9 @@ private:
/** refresh after fonts have been changed */
void refresh();
/** callback to be used on change of font size setting */
static void fontSettingChanged(const std::string &name, void *userdata);
/** pointer to irrlicht gui environment */
gui::IGUIEnvironment* m_env = nullptr;
@@ -164,6 +170,8 @@ private:
/** default font engine mode (fixed) */
static const FontMode m_currentMode = FM_Standard;
bool m_needs_reload = false;
DISABLE_CLASS_COPY(FontEngine);
};