don't load achievements icons in the overlay, already done in steam_user_stats

This commit is contained in:
a 2024-08-18 03:13:36 +03:00
parent 530a26f07b
commit 917eea288a
2 changed files with 1 additions and 39 deletions

View File

@ -158,7 +158,6 @@ class Steam_Overlay
// some stuff has to be initialized once the renderer hook is ready // some stuff has to be initialized once the renderer hook is ready
std::atomic<bool> late_init_imgui = false; std::atomic<bool> late_init_imgui = false;
bool late_init_ach_icons = false;
// changed each time a notification is posted or overlay is shown/hidden // changed each time a notification is posted or overlay is shown/hidden
std::atomic_uint32_t renderer_frame_processing_requests = 0; std::atomic_uint32_t renderer_frame_processing_requests = 0;
@ -234,7 +233,6 @@ class Steam_Overlay
void create_fonts(); void create_fonts();
void load_audio(); void load_audio();
void load_achievements_data(); void load_achievements_data();
void initial_load_achievements_icons();
void overlay_state_hook(bool ready); void overlay_state_hook(bool ready);
void allow_renderer_frame_processing(bool state, bool cleaning_up_overlay = false); void allow_renderer_frame_processing(bool state, bool cleaning_up_overlay = false);

View File

@ -374,40 +374,6 @@ void Steam_Overlay::load_achievements_data()
} }
void Steam_Overlay::initial_load_achievements_icons()
{
{
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
if (late_init_ach_icons) return;
}
PRINT_DEBUG_ENTRY();
for (auto &ach : achievements) {
{
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
if (!is_ready || !setup_overlay_called) {
PRINT_DEBUG("early exit");
return;
}
}
try_load_ach_icon(ach, true);
{
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
if (!is_ready || !setup_overlay_called) {
PRINT_DEBUG("early exit");
return;
}
}
try_load_ach_icon(ach, false);
}
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
late_init_ach_icons = true;
}
// called initially and when window size is updated // called initially and when window size is updated
void Steam_Overlay::overlay_state_hook(bool ready) void Steam_Overlay::overlay_state_hook(bool ready)
{ {
@ -1310,8 +1276,6 @@ bool Steam_Overlay::try_load_ach_icon(Overlay_Achievement &ach, bool achieved)
// Try to make this function as short as possible or it might affect game's fps. // Try to make this function as short as possible or it might affect game's fps.
void Steam_Overlay::overlay_render_proc() void Steam_Overlay::overlay_render_proc()
{ {
initial_load_achievements_icons();
std::lock_guard<std::recursive_mutex> lock(overlay_mutex); std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
if (!Ready()) return; if (!Ready()) return;
@ -1897,7 +1861,7 @@ void Steam_Overlay::UnSetupOverlay()
bool Steam_Overlay::Ready() const bool Steam_Overlay::Ready() const
{ {
return !settings->disable_overlay && is_ready && late_init_imgui && late_init_ach_icons; return !settings->disable_overlay && is_ready && late_init_imgui;
} }
bool Steam_Overlay::NeedPresent() const bool Steam_Overlay::NeedPresent() const