Permalink
Browse files

Fixed bug re default plugins state file directory

  • Loading branch information...
1 parent 440deaa commit 8ee06e46a68fb63c18313c52909c49fca1b53db7 @nickgammon committed Aug 2, 2010
Showing with 4 additions and 9 deletions.
  1. +4 −9 globalregistryoptions.cpp
View
13 globalregistryoptions.cpp
@@ -114,7 +114,6 @@ int CMUSHclientApp::PopulateDatabase (void)
for (i = 0; GlobalOptionsTable [i].pName; i++)
{
- const char * p = (const char *) this + GlobalOptionsTable [i].iOffset;
const int Value = GetProfileInt ("Global prefs",
GlobalOptionsTable [i].pName,
GlobalOptionsTable [i].iDefault);
@@ -128,7 +127,6 @@ int CMUSHclientApp::PopulateDatabase (void)
for (i = 0; AlphaGlobalOptionsTable [i].pName; i++)
{
- const char * p = (const char *) this + AlphaGlobalOptionsTable [i].iOffset;
// fix up the fixed-pitch font
if (strcmp (AlphaGlobalOptionsTable [i].pName, "DefaultInputFont") == 0 ||
@@ -164,13 +162,6 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
int i;
string db_value;
- // for Willfa - make state directory default to plugins directory (whatever that is now) with state\ at the end
- for (i = 0; AlphaGlobalOptionsTable [i].pName; i++)
- {
- if (strcmp (AlphaGlobalOptionsTable [i].pName, "StateFilesDirectory") == 0)
- AlphaGlobalOptionsTable [i].sDefault = (LPCTSTR) (App.m_strPluginsDirectory + "state\\");
- }
-
for (i = 0; GlobalOptionsTable [i].pName; i++)
{
const char * p = (const char *) this + GlobalOptionsTable [i].iOffset;
@@ -197,6 +188,10 @@ void CMUSHclientApp::LoadGlobalsFromDatabase (void)
* (CString *) p = db_value.c_str ();
+ // for Willfa - make state directory default to plugins directory (whatever that is now) with state\ at the end
+ if (strcmp (AlphaGlobalOptionsTable [i].pName, "StateFilesDirectory") == 0)
+ AlphaGlobalOptionsTable [i].sDefault = (LPCTSTR) (App.m_strPluginsDirectory + "state\\");
+
};

0 comments on commit 8ee06e4

Please sign in to comment.