Skip to content

Commit 8ee06e4

Browse files
committed
Fixed bug re default plugins state file directory
1 parent 440deaa commit 8ee06e4

File tree

1 file changed

+4
-9
lines changed

1 file changed

+4
-9
lines changed

globalregistryoptions.cpp

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,6 @@ int CMUSHclientApp::PopulateDatabase (void)
114114

115115
for (i = 0; GlobalOptionsTable [i].pName; i++)
116116
{
117-
const char * p = (const char *) this + GlobalOptionsTable [i].iOffset;
118117
const int Value = GetProfileInt ("Global prefs",
119118
GlobalOptionsTable [i].pName,
120119
GlobalOptionsTable [i].iDefault);
@@ -128,7 +127,6 @@ int CMUSHclientApp::PopulateDatabase (void)
128127

129128
for (i = 0; AlphaGlobalOptionsTable [i].pName; i++)
130129
{
131-
const char * p = (const char *) this + AlphaGlobalOptionsTable [i].iOffset;
132130

133131
// fix up the fixed-pitch font
134132
if (strcmp (AlphaGlobalOptionsTable [i].pName, "DefaultInputFont") == 0 ||
@@ -164,13 +162,6 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
164162
int i;
165163
string db_value;
166164

167-
// for Willfa - make state directory default to plugins directory (whatever that is now) with state\ at the end
168-
for (i = 0; AlphaGlobalOptionsTable [i].pName; i++)
169-
{
170-
if (strcmp (AlphaGlobalOptionsTable [i].pName, "StateFilesDirectory") == 0)
171-
AlphaGlobalOptionsTable [i].sDefault = (LPCTSTR) (App.m_strPluginsDirectory + "state\\");
172-
}
173-
174165
for (i = 0; GlobalOptionsTable [i].pName; i++)
175166
{
176167
const char * p = (const char *) this + GlobalOptionsTable [i].iOffset;
@@ -197,6 +188,10 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
197188

198189
* (CString *) p = db_value.c_str ();
199190

191+
// for Willfa - make state directory default to plugins directory (whatever that is now) with state\ at the end
192+
if (strcmp (AlphaGlobalOptionsTable [i].pName, "StateFilesDirectory") == 0)
193+
AlphaGlobalOptionsTable [i].sDefault = (LPCTSTR) (App.m_strPluginsDirectory + "state\\");
194+
200195
};
201196

202197

0 commit comments

Comments
 (0)