load achievements strings before creating fonts, so that their glyphs ranges are taken into consideration

This commit is contained in:
otavepto 2024-04-04 02:47:12 +02:00
parent 5ddbfccfdd
commit b8d9b25a79
3 changed files with 11 additions and 2 deletions

View File

@ -1,3 +1,8 @@
# 2024/4/3 (hotfix 1)
* load achievements strings before creating fonts, so that their glyphs ranges are taken into consideration
---
# 2024/4/3
* **[detiam]** fix linking errors when building on archlinux

View File

@ -196,6 +196,7 @@ class Steam_Overlay
void renderer_detector_delay_thread();
void renderer_hook_init_thread();
// note: make sure to load all relevant strings before creating the font(s), otherwise some glyphs ranges will be missing
void create_fonts();
void load_audio();
void load_achievements_data();

View File

@ -202,9 +202,11 @@ void Steam_Overlay::renderer_hook_init_thread()
// std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
_renderer = future_renderer.get();
PRINT_DEBUG("Steam_Overlay::renderer_hook_init_thread got renderer %p\n", _renderer);
create_fonts();
load_audio();
// note: make sure to load all relevant strings before creating the font(s), otherwise some glyphs ranges will be missing
load_achievements_data();
load_audio();
create_fonts();
// setup renderer callbacks
const static std::set<InGameOverlay::ToggleKey> overlay_toggle_keys = {
@ -221,6 +223,7 @@ void Steam_Overlay::renderer_hook_init_thread()
PRINT_DEBUG("Steam_Overlay::renderer_hook_init_thread started renderer hook (result=%i)\n", (int)started);
}
// note: make sure to load all relevant strings before creating the font(s), otherwise some glyphs ranges will be missing
void Steam_Overlay::create_fonts()
{
static std::atomic<bool> create_fonts_called = false;