Merge pull request #9319 from JosJuice/default-enabled-no-propagate
Core: Don't copy default _Enabled sections to user INIs
This commit is contained in:
commit
9bb8107a05
|
@ -285,10 +285,8 @@ void SaveCodes(IniFile* local_ini, const std::vector<ARCode>& codes)
|
||||||
|
|
||||||
for (const ActionReplay::ARCode& code : codes)
|
for (const ActionReplay::ARCode& code : codes)
|
||||||
{
|
{
|
||||||
if (code.enabled)
|
if (code.enabled != code.default_enabled)
|
||||||
enabled_lines.emplace_back('$' + code.name);
|
(code.enabled ? enabled_lines : disabled_lines).emplace_back('$' + code.name);
|
||||||
else if (code.default_enabled)
|
|
||||||
disabled_lines.emplace_back('$' + code.name);
|
|
||||||
|
|
||||||
if (code.user_defined)
|
if (code.user_defined)
|
||||||
{
|
{
|
||||||
|
|
|
@ -242,10 +242,8 @@ void SaveCodes(IniFile& inifile, const std::vector<GeckoCode>& gcodes)
|
||||||
|
|
||||||
for (const GeckoCode& geckoCode : gcodes)
|
for (const GeckoCode& geckoCode : gcodes)
|
||||||
{
|
{
|
||||||
if (geckoCode.enabled)
|
if (geckoCode.enabled != geckoCode.default_enabled)
|
||||||
enabled_lines.emplace_back('$' + geckoCode.name);
|
(geckoCode.enabled ? enabled_lines : disabled_lines).emplace_back('$' + geckoCode.name);
|
||||||
else if (geckoCode.default_enabled)
|
|
||||||
disabled_lines.emplace_back('$' + geckoCode.name);
|
|
||||||
|
|
||||||
SaveGeckoCode(lines, geckoCode);
|
SaveGeckoCode(lines, geckoCode);
|
||||||
}
|
}
|
||||||
|
|
|
@ -133,10 +133,8 @@ void PatchesWidget::SavePatches()
|
||||||
|
|
||||||
for (const auto& patch : m_patches)
|
for (const auto& patch : m_patches)
|
||||||
{
|
{
|
||||||
if (patch.enabled)
|
if (patch.enabled != patch.default_enabled)
|
||||||
lines_enabled.emplace_back('$' + patch.name);
|
(patch.enabled ? lines_enabled : lines_disabled).emplace_back('$' + patch.name);
|
||||||
else if (patch.default_enabled)
|
|
||||||
lines_disabled.emplace_back('$' + patch.name);
|
|
||||||
|
|
||||||
if (!patch.user_defined)
|
if (!patch.user_defined)
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue