mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-28 05:06:42 +00:00
Unify GetGameIniFilenames
This deduplicates code and fixes the new config system's lack of 1-char game ID INI support.
This commit is contained in:
parent
1de9bf2cca
commit
d4f5038571
5 changed files with 23 additions and 39 deletions
|
@ -40,6 +40,7 @@
|
|||
#include "Common/FileUtil.h"
|
||||
#include "Common/IniFile.h"
|
||||
#include "Common/StringUtil.h"
|
||||
#include "Core/ConfigLoaders/GameConfigLoader.h"
|
||||
#include "Core/ConfigManager.h"
|
||||
#include "Core/Core.h"
|
||||
#include "Core/GeckoCodeConfig.h"
|
||||
|
@ -444,7 +445,7 @@ void CISOProperties::CreateGUIControls()
|
|||
|
||||
// If there is no default gameini, disable the button.
|
||||
const std::vector<std::string> ini_names =
|
||||
SConfig::GetGameIniFilenames(game_id, m_open_iso->GetRevision());
|
||||
ConfigLoaders::GetGameIniFilenames(game_id, m_open_iso->GetRevision());
|
||||
const bool game_ini_exists =
|
||||
std::any_of(ini_names.cbegin(), ini_names.cend(), [](const std::string& name) {
|
||||
return File::Exists(File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + name);
|
||||
|
@ -752,7 +753,7 @@ void CISOProperties::OnChangeTitle(wxCommandEvent& event)
|
|||
void CISOProperties::OnShowDefaultConfig(wxCommandEvent& WXUNUSED(event))
|
||||
{
|
||||
for (const std::string& filename :
|
||||
SConfig::GetGameIniFilenames(game_id, m_open_iso->GetRevision()))
|
||||
ConfigLoaders::GetGameIniFilenames(game_id, m_open_iso->GetRevision()))
|
||||
{
|
||||
std::string path = File::GetSysDirectory() + GAMESETTINGS_DIR DIR_SEP + filename;
|
||||
if (File::Exists(path))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue