SPU2: Fix uninitialized bitset

Causes config reloads even when nothing changed.
This commit is contained in:
Connor McLaughlin 2022-10-01 13:23:25 +10:00 committed by refractionpcsx2
parent 27229da36f
commit d1021749bc
2 changed files with 5 additions and 2 deletions

View File

@ -613,7 +613,6 @@ struct Pcsx2Config
NoSync,
};
BITFIELD32()
bool
AdvancedVolumeControl : 1;
@ -637,6 +636,7 @@ struct Pcsx2Config
float VolumeAdjustLFE{ 0.0f };
std::string OutputModule;
std::string BackendName;
SPU2Options();
@ -663,7 +663,8 @@ struct Pcsx2Config
OpEqu(VolumeAdjustSR) &&
OpEqu(VolumeAdjustLFE) &&
OpEqu(OutputModule);
OpEqu(OutputModule) &&
OpEqu(BackendName);
}
bool operator!=(const SPU2Options& right) const

View File

@ -692,6 +692,7 @@ VsyncMode Pcsx2Config::GetEffectiveVsyncMode() const
Pcsx2Config::SPU2Options::SPU2Options()
{
bitset = 0;
OutputModule = "cubeb";
}
@ -717,6 +718,7 @@ void Pcsx2Config::SPU2Options::LoadSave(SettingsWrapper& wrap)
SettingsWrapSection("SPU2/Output");
SettingsWrapEntry(OutputModule);
SettingsWrapEntry(BackendName);
SettingsWrapEntry(Latency);
SynchMode = static_cast<SynchronizationMode>(wrap.EntryBitfield(CURRENT_SETTINGS_SECTION, "SynchMode", static_cast<int>(SynchMode), static_cast<int>(SynchMode)));
SettingsWrapEntry(SpeakerConfiguration);