mirror of
https://github.com/Detanup01/gbe_fork.git
synced 2024-11-23 11:15:34 +08:00
don't load achievements icons in the overlay, already done in steam_user_stats
This commit is contained in:
parent
530a26f07b
commit
917eea288a
@ -158,7 +158,6 @@ class Steam_Overlay
|
||||
|
||||
// some stuff has to be initialized once the renderer hook is ready
|
||||
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
|
||||
std::atomic_uint32_t renderer_frame_processing_requests = 0;
|
||||
@ -234,7 +233,6 @@ class Steam_Overlay
|
||||
void create_fonts();
|
||||
void load_audio();
|
||||
void load_achievements_data();
|
||||
void initial_load_achievements_icons();
|
||||
|
||||
void overlay_state_hook(bool ready);
|
||||
void allow_renderer_frame_processing(bool state, bool cleaning_up_overlay = false);
|
||||
|
@ -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
|
||||
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.
|
||||
void Steam_Overlay::overlay_render_proc()
|
||||
{
|
||||
initial_load_achievements_icons();
|
||||
|
||||
std::lock_guard<std::recursive_mutex> lock(overlay_mutex);
|
||||
if (!Ready()) return;
|
||||
|
||||
@ -1897,7 +1861,7 @@ void Steam_Overlay::UnSetupOverlay()
|
||||
|
||||
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
|
||||
|
Loading…
Reference in New Issue
Block a user