Skip to content

Commit 908a293

Browse files
committed
[Minor] Sort Main.Config
1 parent 794a15e commit 908a293

File tree

2 files changed

+36
-32
lines changed

2 files changed

+36
-32
lines changed

src/Main.Config.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,23 +33,23 @@ void MainConfig::LoadFromINIFile()
3333
const char* pOptionsSection = "Options";
3434
if (pINI->GetSection(pOptionsSection))
3535
{
36-
this->MPDebug = pINI->ReadBool(pOptionsSection, "MPDEBUG", this->MPDebug);
37-
this->SingleProcAffinity = pINI->ReadBool(pOptionsSection, "SingleProcAffinity", this->SingleProcAffinity);
36+
this->AllowChat = pINI->ReadBool(pOptionsSection, "AllowChat", this->AllowChat);
37+
this->AllowTaunts = pINI->ReadBool(pOptionsSection, "AllowTaunts", this->AllowTaunts);
38+
this->DDrawHandlesClose = pINI->ReadBool(pOptionsSection, "DDrawHandlesClose", this->DDrawHandlesClose);
3839
this->DisableEdgeScrolling = pINI->ReadBool(pOptionsSection, "DisableEdgeScrolling", this->DisableEdgeScrolling);
40+
this->MPDebug = pINI->ReadBool(pOptionsSection, "MPDEBUG", this->MPDebug);
3941
this->QuickExit = pINI->ReadBool(pOptionsSection, "QuickExit", this->QuickExit);
42+
this->SingleProcAffinity = pINI->ReadBool(pOptionsSection, "SingleProcAffinity", this->SingleProcAffinity);
4043
this->SkipScoreScreen = pINI->ReadBool(pOptionsSection, "SkipScoreScreen", this->SkipScoreScreen);
41-
this->DDrawHandlesClose = pINI->ReadBool(pOptionsSection, "DDrawHandlesClose", this->DDrawHandlesClose);
4244
this->SpeedControl = pINI->ReadBool(pOptionsSection, "SpeedControl", this->SpeedControl);
43-
this->AllowTaunts = pINI->ReadBool(pOptionsSection, "AllowTaunts", this->AllowTaunts);
44-
this->AllowChat = pINI->ReadBool(pOptionsSection, "AllowChat", this->AllowChat);
4545
}
4646

4747
const char* pVideoSection = "Video";
4848
if (pINI->GetSection(pVideoSection))
4949
{
50-
this->WindowedMode = pINI->ReadBool(pVideoSection, "Video.Windowed", this->WindowedMode);
51-
this->NoWindowFrame = pINI->ReadBool(pVideoSection, "NoWindowFrame", this->NoWindowFrame);
5250
this->DDrawTargetFPS = pINI->ReadInteger(pVideoSection, "DDrawTargetFPS", this->DDrawTargetFPS);
51+
this->NoWindowFrame = pINI->ReadBool(pVideoSection, "NoWindowFrame", this->NoWindowFrame);
52+
this->WindowedMode = pINI->ReadBool(pVideoSection, "Video.Windowed", this->WindowedMode);
5353
}
5454
}
5555

src/Main.Config.h

Lines changed: 29 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -21,46 +21,50 @@
2121
class MainConfig
2222
{
2323
public:
24-
bool MPDebug;
25-
bool DumpTypes;
26-
bool NoCD;
27-
int RA2ModeSaveID;
28-
29-
bool SingleProcAffinity;
24+
// Options
25+
bool AllowChat;
26+
bool AllowTaunts;
27+
bool DDrawHandlesClose;
3028
bool DisableEdgeScrolling;
29+
bool MPDebug;
3130
bool QuickExit;
31+
bool SingleProcAffinity;
3232
bool SkipScoreScreen;
33-
bool DDrawHandlesClose;
3433
bool SpeedControl;
3534

36-
bool WindowedMode;
35+
// Video
3736
bool NoWindowFrame;
38-
int DDrawTargetFPS;
39-
40-
bool AllowTaunts;
41-
bool AllowChat;
37+
bool WindowedMode;
38+
int DDrawTargetFPS;
4239

43-
void LoadFromINIFile();
44-
void ApplyStaticOptions();
40+
// Other
41+
bool DumpTypes;
42+
bool NoCD;
43+
int RA2ModeSaveID;
4544

4645
MainConfig()
47-
: MPDebug { false }
48-
, DumpTypes { false }
49-
, NoCD { false }
50-
, RA2ModeSaveID { 0 }
51-
52-
, SingleProcAffinity { true }
46+
// Options
47+
: AllowChat { true }
48+
, AllowTaunts { true }
49+
, DDrawHandlesClose { false }
5350
, DisableEdgeScrolling { false }
51+
, MPDebug { false }
5452
, QuickExit { false }
53+
, SingleProcAffinity { true }
5554
, SkipScoreScreen { false }
56-
, DDrawHandlesClose { false }
5755
, SpeedControl { false }
5856

59-
, WindowedMode { false }
60-
, NoWindowFrame { false }
57+
// Video
6158
, DDrawTargetFPS { -1 }
59+
, NoWindowFrame { false }
60+
, WindowedMode { false }
6261

63-
, AllowTaunts { true }
64-
, AllowChat { true }
62+
// Other
63+
, DumpTypes { false }
64+
, NoCD { false }
65+
, RA2ModeSaveID { 0 }
6566
{ }
67+
68+
void LoadFromINIFile();
69+
void ApplyStaticOptions();
6670
};

0 commit comments

Comments
 (0)