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:
@@ -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);
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user