-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
Pcsx2Config.cpp
727 lines (620 loc) · 17.4 KB
/
Pcsx2Config.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
/* PCSX2 - PS2 Emulator for PCs
* Copyright (C) 2002-2021 PCSX2 Dev Team
*
* PCSX2 is free software: you can redistribute it and/or modify it under the terms
* of the GNU Lesser General Public License as published by the Free Software Found-
* ation, either version 3 of the License, or (at your option) any later version.
*
* PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
* without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
* PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with PCSX2.
* If not, see <http://www.gnu.org/licenses/>.
*/
#include "PrecompiledHeader.h"
#include <wx/fileconf.h>
#include "common/SettingsInterface.h"
#include "common/SettingsWrapper.h"
#include "common/StringUtil.h"
#include "Config.h"
#include "GS.h"
#include "CDVD/CDVDaccess.h"
#include "MemoryCardFile.h"
#ifndef PCSX2_CORE
#include "gui/AppConfig.h"
#endif
namespace EmuFolders
{
wxDirName Settings;
wxDirName Bios;
wxDirName Snapshots;
wxDirName Savestates;
wxDirName MemoryCards;
wxDirName Langs;
wxDirName Logs;
wxDirName Cheats;
wxDirName CheatsWS;
wxDirName Resources;
wxDirName Cache;
} // namespace EmuFolders
void TraceLogFilters::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/TraceLog");
SettingsWrapEntry(Enabled);
// Retaining backwards compat of the trace log enablers isn't really important, and
// doing each one by hand would be murder. So let's cheat and just save it as an int:
SettingsWrapEntry(EE.bitset);
SettingsWrapEntry(IOP.bitset);
}
const wxChar* const tbl_SpeedhackNames[] =
{
L"mvuFlag",
L"InstantVU1"};
const __fi wxChar* EnumToString(SpeedhackId id)
{
return tbl_SpeedhackNames[id];
}
void Pcsx2Config::SpeedhackOptions::Set(SpeedhackId id, bool enabled)
{
EnumAssert(id);
switch (id)
{
case Speedhack_mvuFlag:
vuFlagHack = enabled;
break;
case Speedhack_InstantVU1:
vu1Instant = enabled;
break;
jNO_DEFAULT;
}
}
Pcsx2Config::SpeedhackOptions::SpeedhackOptions()
{
DisableAll();
// Set recommended speedhacks to enabled by default. They'll still be off globally on resets.
WaitLoop = true;
IntcStat = true;
vuFlagHack = true;
vu1Instant = true;
}
Pcsx2Config::SpeedhackOptions& Pcsx2Config::SpeedhackOptions::DisableAll()
{
bitset = 0;
EECycleRate = 0;
EECycleSkip = 0;
return *this;
}
void Pcsx2Config::SpeedhackOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/Speedhacks");
SettingsWrapBitfield(EECycleRate);
SettingsWrapBitfield(EECycleSkip);
SettingsWrapBitBool(fastCDVD);
SettingsWrapBitBool(IntcStat);
SettingsWrapBitBool(WaitLoop);
SettingsWrapBitBool(vuFlagHack);
SettingsWrapBitBool(vuThread);
SettingsWrapBitBool(vu1Instant);
}
void Pcsx2Config::ProfilerOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/Profiler");
SettingsWrapBitBool(Enabled);
SettingsWrapBitBool(RecBlocks_EE);
SettingsWrapBitBool(RecBlocks_IOP);
SettingsWrapBitBool(RecBlocks_VU0);
SettingsWrapBitBool(RecBlocks_VU1);
}
Pcsx2Config::RecompilerOptions::RecompilerOptions()
{
bitset = 0;
//StackFrameChecks = false;
//PreBlockCheckEE = false;
// All recs are enabled by default.
EnableEE = true;
EnableEECache = false;
EnableIOP = true;
EnableVU0 = true;
EnableVU1 = true;
// vu and fpu clamping default to standard overflow.
vuOverflow = true;
//vuExtraOverflow = false;
//vuSignOverflow = false;
//vuUnderflow = false;
fpuOverflow = true;
//fpuExtraOverflow = false;
//fpuFullMode = false;
}
void Pcsx2Config::RecompilerOptions::ApplySanityCheck()
{
bool fpuIsRight = true;
if (fpuExtraOverflow)
fpuIsRight = fpuOverflow;
if (fpuFullMode)
fpuIsRight = fpuOverflow && fpuExtraOverflow;
if (!fpuIsRight)
{
// Values are wonky; assume the defaults.
fpuOverflow = RecompilerOptions().fpuOverflow;
fpuExtraOverflow = RecompilerOptions().fpuExtraOverflow;
fpuFullMode = RecompilerOptions().fpuFullMode;
}
bool vuIsOk = true;
if (vuExtraOverflow)
vuIsOk = vuIsOk && vuOverflow;
if (vuSignOverflow)
vuIsOk = vuIsOk && vuExtraOverflow;
if (!vuIsOk)
{
// Values are wonky; assume the defaults.
vuOverflow = RecompilerOptions().vuOverflow;
vuExtraOverflow = RecompilerOptions().vuExtraOverflow;
vuSignOverflow = RecompilerOptions().vuSignOverflow;
vuUnderflow = RecompilerOptions().vuUnderflow;
}
}
void Pcsx2Config::RecompilerOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/CPU/Recompiler");
SettingsWrapBitBool(EnableEE);
SettingsWrapBitBool(EnableIOP);
SettingsWrapBitBool(EnableEECache);
SettingsWrapBitBool(EnableVU0);
SettingsWrapBitBool(EnableVU1);
SettingsWrapBitBool(vuOverflow);
SettingsWrapBitBool(vuExtraOverflow);
SettingsWrapBitBool(vuSignOverflow);
SettingsWrapBitBool(vuUnderflow);
SettingsWrapBitBool(fpuOverflow);
SettingsWrapBitBool(fpuExtraOverflow);
SettingsWrapBitBool(fpuFullMode);
SettingsWrapBitBool(StackFrameChecks);
SettingsWrapBitBool(PreBlockCheckEE);
SettingsWrapBitBool(PreBlockCheckIOP);
}
Pcsx2Config::CpuOptions::CpuOptions()
{
sseMXCSR.bitmask = DEFAULT_sseMXCSR;
sseVUMXCSR.bitmask = DEFAULT_sseVUMXCSR;
}
void Pcsx2Config::CpuOptions::ApplySanityCheck()
{
sseMXCSR.ClearExceptionFlags().DisableExceptions();
sseVUMXCSR.ClearExceptionFlags().DisableExceptions();
Recompiler.ApplySanityCheck();
}
void Pcsx2Config::CpuOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/CPU");
SettingsWrapBitBoolEx(sseMXCSR.DenormalsAreZero, "FPU.DenormalsAreZero");
SettingsWrapBitBoolEx(sseMXCSR.FlushToZero, "FPU.FlushToZero");
SettingsWrapBitfieldEx(sseMXCSR.RoundingControl, "FPU.Roundmode");
SettingsWrapBitBoolEx(sseVUMXCSR.DenormalsAreZero, "VU.DenormalsAreZero");
SettingsWrapBitBoolEx(sseVUMXCSR.FlushToZero, "VU.FlushToZero");
SettingsWrapBitfieldEx(sseVUMXCSR.RoundingControl, "VU.Roundmode");
Recompiler.LoadSave(wrap);
}
void Pcsx2Config::GSOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/GS");
#ifdef PCSX2_DEVBUILD
SettingsWrapEntry(SynchronousMTGS);
#endif
SettingsWrapEntry(VsyncQueueSize);
SettingsWrapEntry(FrameLimitEnable);
SettingsWrapEntry(FrameSkipEnable);
wrap.EnumEntry(CURRENT_SETTINGS_SECTION, "VsyncEnable", VsyncEnable, NULL, VsyncEnable);
SettingsWrapEntry(LimitScalar);
SettingsWrapEntry(FramerateNTSC);
SettingsWrapEntry(FrameratePAL);
SettingsWrapEntry(FramesToDraw);
SettingsWrapEntry(FramesToSkip);
#ifdef PCSX2_CORE
static const char* AspectRatioNames[] =
{
"Stretch",
"4:3",
"16:9",
// WARNING: array must be NULL terminated to compute it size
NULL};
wrap.EnumEntry("AspectRatio", AspectRatio, AspectRatioNames, AspectRatio);
static const char* FMVAspectRatioSwitchNames[] =
{
"Off",
"4:3",
"16:9",
// WARNING: array must be NULL terminated to compute it size
NULL};
wrap.EnumEntry("FMVAspectRatioSwitch", FMVAspectRatioSwitch, FMVAspectRatioSwitchNames, FMVAspectRatioSwitch);
SettingsWrapEntry(Zoom);
#endif
}
int Pcsx2Config::GSOptions::GetVsync() const
{
if (EmuConfig.LimiterMode == LimiterModeType::Turbo || !FrameLimitEnable)
return 0;
// D3D only support a boolean state. OpenGL waits a number of vsync
// interrupt (negative value for late vsync).
switch (VsyncEnable)
{
case VsyncMode::Adaptive:
return -1;
case VsyncMode::Off:
return 0;
case VsyncMode::On:
return 1;
default:
return 0;
}
}
const wxChar* const tbl_GamefixNames[] =
{
L"FpuMul",
L"FpuNegDiv",
L"GoemonTlb",
L"SkipMPEG",
L"OPHFlag",
L"EETiming",
L"DMABusy",
L"GIFFIFO",
L"VIFFIFO",
L"VIF1Stall",
L"VuAddSub",
L"Ibit",
L"VUKickstart",
L"VUOverflow",
L"XGKick"};
const __fi wxChar* EnumToString(GamefixId id)
{
return tbl_GamefixNames[id];
}
// all gamefixes are disabled by default.
Pcsx2Config::GamefixOptions::GamefixOptions()
{
DisableAll();
}
Pcsx2Config::GamefixOptions& Pcsx2Config::GamefixOptions::DisableAll()
{
bitset = 0;
return *this;
}
// Enables a full list of gamefixes. The list can be either comma or pipe-delimited.
// Example: "XGKick,IpuWait" or "EEtiming,FpuCompare"
// If an unrecognized tag is encountered, a warning is printed to the console, but no error
// is generated. This allows the system to function in the event that future versions of
// PCSX2 remove old hacks once they become obsolete.
void Pcsx2Config::GamefixOptions::Set(const wxString& list, bool enabled)
{
wxStringTokenizer izer(list, L",|", wxTOKEN_STRTOK);
while (izer.HasMoreTokens())
{
wxString token(izer.GetNextToken());
GamefixId i;
for (i = GamefixId_FIRST; i < pxEnumEnd; ++i)
{
if (token.CmpNoCase(EnumToString(i)) == 0)
break;
}
if (i < pxEnumEnd)
Set(i);
}
}
void Pcsx2Config::GamefixOptions::Set(GamefixId id, bool enabled)
{
EnumAssert(id);
switch (id)
{
case Fix_VuAddSub:
VuAddSubHack = enabled;
break;
case Fix_FpuMultiply:
FpuMulHack = enabled;
break;
case Fix_FpuNegDiv:
FpuNegDivHack = enabled;
break;
case Fix_XGKick:
XgKickHack = enabled;
break;
case Fix_EETiming:
EETimingHack = enabled;
break;
case Fix_SkipMpeg:
SkipMPEGHack = enabled;
break;
case Fix_OPHFlag:
OPHFlagHack = enabled;
break;
case Fix_DMABusy:
DMABusyHack = enabled;
break;
case Fix_VIFFIFO:
VIFFIFOHack = enabled;
break;
case Fix_VIF1Stall:
VIF1StallHack = enabled;
break;
case Fix_GIFFIFO:
GIFFIFOHack = enabled;
break;
case Fix_GoemonTlbMiss:
GoemonTlbHack = enabled;
break;
case Fix_Ibit:
IbitHack = enabled;
break;
case Fix_VUKickstart:
VUKickstartHack = enabled;
break;
case Fix_VUOverflow:
VUOverflowHack = enabled;
break;
jNO_DEFAULT;
}
}
bool Pcsx2Config::GamefixOptions::Get(GamefixId id) const
{
EnumAssert(id);
switch (id)
{
case Fix_VuAddSub:
return VuAddSubHack;
case Fix_FpuMultiply:
return FpuMulHack;
case Fix_FpuNegDiv:
return FpuNegDivHack;
case Fix_XGKick:
return XgKickHack;
case Fix_EETiming:
return EETimingHack;
case Fix_SkipMpeg:
return SkipMPEGHack;
case Fix_OPHFlag:
return OPHFlagHack;
case Fix_DMABusy:
return DMABusyHack;
case Fix_VIFFIFO:
return VIFFIFOHack;
case Fix_VIF1Stall:
return VIF1StallHack;
case Fix_GIFFIFO:
return GIFFIFOHack;
case Fix_GoemonTlbMiss:
return GoemonTlbHack;
case Fix_Ibit:
return IbitHack;
case Fix_VUKickstart:
return VUKickstartHack;
case Fix_VUOverflow:
return VUOverflowHack;
jNO_DEFAULT;
}
return false; // unreachable, but we still need to suppress warnings >_<
}
void Pcsx2Config::GamefixOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/Gamefixes");
SettingsWrapBitBool(VuAddSubHack);
SettingsWrapBitBool(FpuMulHack);
SettingsWrapBitBool(FpuNegDivHack);
SettingsWrapBitBool(XgKickHack);
SettingsWrapBitBool(EETimingHack);
SettingsWrapBitBool(SkipMPEGHack);
SettingsWrapBitBool(OPHFlagHack);
SettingsWrapBitBool(DMABusyHack);
SettingsWrapBitBool(VIFFIFOHack);
SettingsWrapBitBool(VIF1StallHack);
SettingsWrapBitBool(GIFFIFOHack);
SettingsWrapBitBool(GoemonTlbHack);
SettingsWrapBitBool(IbitHack);
SettingsWrapBitBool(VUKickstartHack);
SettingsWrapBitBool(VUOverflowHack);
}
Pcsx2Config::DebugOptions::DebugOptions()
{
ShowDebuggerOnStart = false;
AlignMemoryWindowStart = true;
FontWidth = 8;
FontHeight = 12;
WindowWidth = 0;
WindowHeight = 0;
MemoryViewBytesPerRow = 16;
}
void Pcsx2Config::DebugOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore/Debugger");
SettingsWrapBitBool(ShowDebuggerOnStart);
SettingsWrapBitBool(AlignMemoryWindowStart);
SettingsWrapBitfield(FontWidth);
SettingsWrapBitfield(FontHeight);
SettingsWrapBitfield(WindowWidth);
SettingsWrapBitfield(WindowHeight);
SettingsWrapBitfield(MemoryViewBytesPerRow);
}
Pcsx2Config::FilenameOptions::FilenameOptions()
{
}
void Pcsx2Config::FilenameOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("Filenames");
wrap.Entry(CURRENT_SETTINGS_SECTION, "BIOS", Bios, Bios);
}
void Pcsx2Config::FramerateOptions::SanityCheck()
{
// Ensure Conformation of various options...
NominalScalar = std::clamp(NominalScalar, 0.05, 10.0);
TurboScalar = std::clamp(TurboScalar, 0.05, 10.0);
SlomoScalar = std::clamp(SlomoScalar, 0.05, 10.0);
}
void Pcsx2Config::FramerateOptions::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("Framerate");
SettingsWrapEntry(NominalScalar);
SettingsWrapEntry(TurboScalar);
SettingsWrapEntry(SlomoScalar);
SettingsWrapEntry(SkipOnLimit);
SettingsWrapEntry(SkipOnTurbo);
}
Pcsx2Config::Pcsx2Config()
{
bitset = 0;
// Set defaults for fresh installs / reset settings
McdEnableEjection = true;
McdFolderAutoManage = true;
EnablePatches = true;
BackupSavestate = true;
#ifdef __WXMSW__
McdCompressNTFS = true;
#endif
// To be moved to FileMemoryCard pluign (someday)
for (uint slot = 0; slot < 8; ++slot)
{
Mcd[slot].Enabled = !FileMcd_IsMultitapSlot(slot); // enables main 2 slots
Mcd[slot].Filename = FileMcd_GetDefaultName(slot);
// Folder memory card is autodetected later.
Mcd[slot].Type = MemoryCardType::File;
}
GzipIsoIndexTemplate = "$(f).pindex.tmp";
}
void Pcsx2Config::LoadSave(SettingsWrapper& wrap)
{
SettingsWrapSection("EmuCore");
SettingsWrapBitBool(CdvdVerboseReads);
SettingsWrapBitBool(CdvdDumpBlocks);
SettingsWrapBitBool(CdvdShareWrite);
SettingsWrapBitBool(EnablePatches);
SettingsWrapBitBool(EnableCheats);
SettingsWrapBitBool(EnableIPC);
SettingsWrapBitBool(EnableWideScreenPatches);
#ifndef DISABLE_RECORDING
SettingsWrapBitBool(EnableRecordingTools);
#endif
SettingsWrapBitBool(ConsoleToStdio);
SettingsWrapBitBool(HostFs);
SettingsWrapBitBool(BackupSavestate);
SettingsWrapBitBool(McdEnableEjection);
SettingsWrapBitBool(McdFolderAutoManage);
SettingsWrapBitBool(MultitapPort0_Enabled);
SettingsWrapBitBool(MultitapPort1_Enabled);
// Process various sub-components:
Speedhacks.LoadSave(wrap);
Cpu.LoadSave(wrap);
GS.LoadSave(wrap);
Gamefixes.LoadSave(wrap);
Profiler.LoadSave(wrap);
Debugger.LoadSave(wrap);
Trace.LoadSave(wrap);
SettingsWrapEntry(GzipIsoIndexTemplate);
// For now, this in the derived config for backwards ini compatibility.
#ifdef PCSX2_CORE
BaseFilenames.LoadSave(wrap);
Framerate.LoadSave(wrap);
LoadSaveMemcards(wrap);
SettingsWrapEntry(GzipIsoIndexTemplate);
#ifdef __WXMSW__
SettingsWrapEntry(McdCompressNTFS);
#endif
#endif
if (wrap.IsLoading())
{
CurrentAspectRatio = GS.AspectRatio;
}
}
void Pcsx2Config::LoadSaveMemcards(SettingsWrapper& wrap)
{
for (uint slot = 0; slot < 2; ++slot)
{
wrap.Entry("MemoryCards", StringUtil::StdStringFromFormat("Slot%u_Enable", slot + 1).c_str(),
Mcd[slot].Enabled, Mcd[slot].Enabled);
wrap.Entry("MemoryCards", StringUtil::StdStringFromFormat("Slot%u_Filename", slot + 1).c_str(),
Mcd[slot].Filename, Mcd[slot].Filename);
}
for (uint slot = 2; slot < 8; ++slot)
{
int mtport = FileMcd_GetMtapPort(slot) + 1;
int mtslot = FileMcd_GetMtapSlot(slot) + 1;
wrap.Entry("MemoryCards", StringUtil::StdStringFromFormat("Multitap%u_Slot%u_Enable", mtport, mtslot).c_str(),
Mcd[slot].Enabled, Mcd[slot].Enabled);
wrap.Entry("MemoryCards", StringUtil::StdStringFromFormat("Multitap%u_Slot%u_Filename", mtport, mtslot).c_str(),
Mcd[slot].Filename, Mcd[slot].Filename);
}
}
bool Pcsx2Config::MultitapEnabled(uint port) const
{
pxAssert(port < 2);
return (port == 0) ? MultitapPort0_Enabled : MultitapPort1_Enabled;
}
std::string Pcsx2Config::FullpathToBios() const
{
std::string ret;
if (!BaseFilenames.Bios.empty())
ret = Path::CombineStdString(EmuFolders::Bios, BaseFilenames.Bios);
return ret;
}
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;
GS = cfg.GS;
Speedhacks = cfg.Speedhacks;
Gamefixes = cfg.Gamefixes;
Profiler = cfg.Profiler;
Debugger = cfg.Debugger;
Trace = cfg.Trace;
BaseFilenames = cfg.BaseFilenames;
Framerate = cfg.Framerate;
for (u32 i = 0; i < sizeof(Mcd) / sizeof(Mcd[0]); i++)
{
// Type will be File here, even if it's a folder, so we preserve the old value.
// When the memory card is re-opened, it should redetect anyway.
Mcd[i].Enabled = cfg.Mcd[i].Enabled;
Mcd[i].Filename = cfg.Mcd[i].Filename;
}
GzipIsoIndexTemplate = cfg.GzipIsoIndexTemplate;
CdvdVerboseReads = cfg.CdvdVerboseReads;
CdvdDumpBlocks = cfg.CdvdDumpBlocks;
CdvdShareWrite = cfg.CdvdShareWrite;
EnablePatches = cfg.EnablePatches;
EnableCheats = cfg.EnableCheats;
EnableIPC = cfg.EnableIPC;
EnableWideScreenPatches = cfg.EnableWideScreenPatches;
#ifndef DISABLE_RECORDING
EnableRecordingTools = cfg.EnableRecordingTools;
#endif
UseBOOT2Injection = cfg.UseBOOT2Injection;
BackupSavestate = cfg.BackupSavestate;
McdEnableEjection = cfg.McdEnableEjection;
McdFolderAutoManage = cfg.McdFolderAutoManage;
MultitapPort0_Enabled = cfg.MultitapPort0_Enabled;
MultitapPort1_Enabled = cfg.MultitapPort1_Enabled;
ConsoleToStdio = cfg.ConsoleToStdio;
HostFs = cfg.HostFs;
#ifdef __WXMSW__
McdCompressNTFS = cfg.McdCompressNTFS;
#endif
}