mirror of https://github.com/PCSX2/pcsx2.git
Config: Add missing equality comparisons for a few fields
Fixes memory card changes not getting applied.
This commit is contained in:
parent
00fbc8289d
commit
3c522a0e60
|
@ -490,6 +490,16 @@ struct Pcsx2Config
|
|||
|
||||
void LoadSave(SettingsWrapper& wrap);
|
||||
void SanityCheck();
|
||||
|
||||
bool operator==(const FramerateOptions& right) const
|
||||
{
|
||||
return OpEqu(SkipOnLimit) && OpEqu(SkipOnTurbo) && OpEqu(NominalScalar) && OpEqu(TurboScalar) && OpEqu(SlomoScalar);
|
||||
}
|
||||
|
||||
bool operator!=(const FramerateOptions& right) const
|
||||
{
|
||||
return !this->operator==(right);
|
||||
}
|
||||
};
|
||||
|
||||
// ------------------------------------------------------------------------
|
||||
|
@ -586,19 +596,7 @@ struct Pcsx2Config
|
|||
|
||||
bool MultitapEnabled( uint port ) const;
|
||||
|
||||
bool operator ==( const Pcsx2Config& right ) const
|
||||
{
|
||||
return
|
||||
OpEqu( bitset ) &&
|
||||
OpEqu( Cpu ) &&
|
||||
OpEqu( GS ) &&
|
||||
OpEqu( Speedhacks ) &&
|
||||
OpEqu( Gamefixes ) &&
|
||||
OpEqu( Profiler ) &&
|
||||
OpEqu( Trace ) &&
|
||||
OpEqu( BaseFilenames );
|
||||
}
|
||||
|
||||
bool operator ==(const Pcsx2Config& right) const;
|
||||
bool operator !=( const Pcsx2Config& right ) const
|
||||
{
|
||||
return !this->operator ==( right );
|
||||
|
|
|
@ -610,6 +610,29 @@ wxString Pcsx2Config::FullpathToMcd(uint slot) const
|
|||
return Path::Combine(EmuFolders::MemoryCards, StringUtil::UTF8StringToWxString(Mcd[slot].Filename));
|
||||
}
|
||||
|
||||
bool Pcsx2Config::operator==(const Pcsx2Config& right) const
|
||||
{
|
||||
bool equal =
|
||||
OpEqu(bitset) &&
|
||||
OpEqu(Cpu) &&
|
||||
OpEqu(GS) &&
|
||||
OpEqu(Speedhacks) &&
|
||||
OpEqu(Gamefixes) &&
|
||||
OpEqu(Profiler) &&
|
||||
OpEqu(Debugger) &&
|
||||
OpEqu(Framerate) &&
|
||||
OpEqu(Trace) &&
|
||||
OpEqu(BaseFilenames) &&
|
||||
OpEqu(GzipIsoIndexTemplate);
|
||||
for (u32 i = 0; i < sizeof(Mcd) / sizeof(Mcd[0]); i++)
|
||||
{
|
||||
equal &= OpEqu(Mcd[i].Enabled);
|
||||
equal &= OpEqu(Mcd[i].Filename);
|
||||
}
|
||||
|
||||
return equal;
|
||||
}
|
||||
|
||||
void Pcsx2Config::CopyConfig(const Pcsx2Config& cfg)
|
||||
{
|
||||
Cpu = cfg.Cpu;
|
||||
|
|
Loading…
Reference in New Issue