Qt/optimization: Don't look for PAM files if the game has a hover gif

This commit is contained in:
Megamouse 2025-03-17 12:56:02 +01:00
parent 5b540aed73
commit 58327ca23c

View file

@ -666,7 +666,9 @@ void game_list_frame::OnParsingFinished()
} }
} }
if (game.info.movie_path.empty()) game.has_hover_gif = fs::is_file(game_icon_path + game.info.serial + "/hover.gif");
if (!game.has_hover_gif && game.info.movie_path.empty())
{ {
if (std::string movie_path = sfo_dir + "/" + localized_movie; fs::is_file(movie_path)) if (std::string movie_path = sfo_dir + "/" + localized_movie; fs::is_file(movie_path))
{ {
@ -733,7 +735,6 @@ void game_list_frame::OnParsingFinished()
game.compat = m_game_compat->GetCompatibility(game.info.serial); game.compat = m_game_compat->GetCompatibility(game.info.serial);
game.has_custom_config = fs::is_file(rpcs3::utils::get_custom_config_path(game.info.serial)); game.has_custom_config = fs::is_file(rpcs3::utils::get_custom_config_path(game.info.serial));
game.has_custom_pad_config = fs::is_file(rpcs3::utils::get_custom_input_config_path(game.info.serial)); game.has_custom_pad_config = fs::is_file(rpcs3::utils::get_custom_input_config_path(game.info.serial));
game.has_hover_gif = fs::is_file(game_icon_path + game.info.serial + "/hover.gif");
game.has_hover_pam = !game.info.movie_path.empty(); game.has_hover_pam = !game.info.movie_path.empty();
m_games.push(std::make_shared<gui_game_info>(std::move(game))); m_games.push(std::make_shared<gui_game_info>(std::move(game)));
@ -907,6 +908,8 @@ void game_list_frame::OnRefreshFinished()
} }
} }
if (!entry->has_hover_gif)
{
if (std::string movie_path = other->info.path + "/" + localized_movie; fs::is_file(movie_path)) if (std::string movie_path = other->info.path + "/" + localized_movie; fs::is_file(movie_path))
{ {
entry->info.movie_path = std::move(movie_path); entry->info.movie_path = std::move(movie_path);
@ -919,6 +922,7 @@ void game_list_frame::OnRefreshFinished()
} }
} }
} }
}
// Sort by name at the very least. // Sort by name at the very least.
std::sort(m_game_data.begin(), m_game_data.end(), [&](const game_info& game1, const game_info& game2) std::sort(m_game_data.begin(), m_game_data.end(), [&](const game_info& game1, const game_info& game2)