mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2026-07-26 08:44:12 +02:00
waterfall loading of textures via id to prefer elfid-gameid when launched via elf; fallback to gameid if no match
This commit is contained in:
@@ -23,10 +23,9 @@ DynamicInputTextureManager::~DynamicInputTextureManager() = default;
|
||||
void DynamicInputTextureManager::Load()
|
||||
{
|
||||
m_configuration.clear();
|
||||
|
||||
const std::string& game_id = SConfig::GetInstance().GetGameID();
|
||||
const std::set<std::string> dynamic_input_directories =
|
||||
GetTextureDirectoriesWithGameId(File::GetUserPath(D_DYNAMICINPUT_IDX), game_id);
|
||||
GetTextureDirectoriesForFirstMatchingGameId(File::GetUserPath(D_DYNAMICINPUT_IDX),
|
||||
SConfig::GetInstance().GetGameIDsForTextures());
|
||||
|
||||
for (const auto& dynamic_input_directory : dynamic_input_directories)
|
||||
{
|
||||
@@ -46,8 +45,8 @@ void DynamicInputTextureManager::GenerateTextures(const Common::IniFile& file,
|
||||
{
|
||||
configuration.GenerateTextures(file, controller_names, &output);
|
||||
}
|
||||
|
||||
const std::string& game_id = SConfig::GetInstance().GetGameID();
|
||||
// write to highest preference gameid for textures
|
||||
const std::string& game_id_for_textures = SConfig::GetInstance().GetGameIDForTextures();
|
||||
for (const auto& [generated_folder_name, images] : output)
|
||||
{
|
||||
const auto hi_res_folder = File::GetUserPath(D_HIRESTEXTURES_IDX) + generated_folder_name;
|
||||
@@ -63,7 +62,7 @@ void DynamicInputTextureManager::GenerateTextures(const Common::IniFile& file,
|
||||
File::CreateDir(game_id_folder);
|
||||
}
|
||||
|
||||
File::CreateEmptyFile(game_id_folder + DIR_SEP + game_id + ".txt");
|
||||
File::CreateEmptyFile(game_id_folder + DIR_SEP + game_id_for_textures + ".txt");
|
||||
|
||||
for (const auto& [image_name, image] : images)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user