Skip to content

Commit 6a1710e

Browse files
authored
adding fallback for image path "achievement_images"
1 parent 1460b87 commit 6a1710e

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

dll/steam_user_stats_achievements.cpp

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,15 @@ int Steam_User_Stats::load_ach_icon(nlohmann::json &defined_ach, bool achieved)
9898

9999
std::string file_path(Local_Storage::get_game_settings_path() + icon_filepath);
100100
unsigned int file_size = file_size_(file_path);
101-
if (!file_size) {
102-
defined_ach[icon_handle_key] = Settings::INVALID_IMAGE_HANDLE;
103-
return Settings::INVALID_IMAGE_HANDLE;
101+
if (!file_size)
102+
{
103+
file_path(Local_Storage::get_game_settings_path() + "achievement_images" + PATH_SEPARATOR + icon_filepath);
104+
file_size = file_size_(file_path);
105+
if (!file_size)
106+
{
107+
defined_ach[icon_handle_key] = Settings::INVALID_IMAGE_HANDLE;
108+
return Settings::INVALID_IMAGE_HANDLE;
109+
}
104110
}
105111

106112
int icon_size = static_cast<int>(settings->overlay_appearance.icon_size);

0 commit comments

Comments
 (0)