mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
DolphinQt/Config/ARCodeWidget: Deduplicate ini path
We can just store this to a const local and use it to avoid doing the same work twice.
This commit is contained in:
parent
c70da390a7
commit
0d406f2bdc
@ -168,11 +168,13 @@ void ARCodeWidget::UpdateList()
|
|||||||
|
|
||||||
void ARCodeWidget::SaveCodes()
|
void ARCodeWidget::SaveCodes()
|
||||||
{
|
{
|
||||||
IniFile game_ini_local;
|
const auto ini_path =
|
||||||
game_ini_local.Load(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
|
std::string(File::GetUserPath(D_GAMESETTINGS_IDX)).append(m_game_id).append(".ini");
|
||||||
ActionReplay::SaveCodes(&game_ini_local, m_ar_codes);
|
|
||||||
|
|
||||||
game_ini_local.Save(File::GetUserPath(D_GAMESETTINGS_IDX) + m_game_id + ".ini");
|
IniFile game_ini_local;
|
||||||
|
game_ini_local.Load(ini_path);
|
||||||
|
ActionReplay::SaveCodes(&game_ini_local, m_ar_codes);
|
||||||
|
game_ini_local.Save(ini_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ARCodeWidget::AddCode(ActionReplay::ARCode code)
|
void ARCodeWidget::AddCode(ActionReplay::ARCode code)
|
||||||
|
Loading…
Reference in New Issue
Block a user