mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-20 19:52:12 +00:00
Reload font manager in main thread to avoid a crash (#15900)
This commit is contained in:
parent
4b85062caf
commit
c07499ccfc
4 changed files with 24 additions and 4 deletions
|
@ -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);
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue