Skip to content

Commit

Permalink
Fixed bug re default plugins state file directory
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Aug 2, 2010
1 parent 440deaa commit 8ee06e4
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions globalregistryoptions.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 ||
Expand Down Expand Up @@ -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;
Expand All @@ -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\\");

};


Expand Down

0 comments on commit 8ee06e4

Please sign in to comment.