A new set of preferences has a screwed up Theme setting. SM acts
as if the theme were set to "default", which is correct, but when you enter the Appearances menu, it changes the theme to "beat" instead. This change fixes the bug by making SM use the same string constant everywhere the default theme is set.
This commit is contained in:
@@ -1,15 +1,15 @@
|
|||||||
#include "global.h"
|
#include "global.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
#include "IniFile.h"
|
|
||||||
#include "RageDisplay.h"
|
|
||||||
#include "RageUtil.h"
|
|
||||||
#include "RageFile.h"
|
|
||||||
#include "ProductInfo.h"
|
|
||||||
#include "Foreach.h"
|
#include "Foreach.h"
|
||||||
|
#include "IniFile.h"
|
||||||
|
#include "LuaManager.h"
|
||||||
#include "Preference.h"
|
#include "Preference.h"
|
||||||
|
#include "ProductInfo.h"
|
||||||
|
#include "RageDisplay.h"
|
||||||
|
#include "RageFile.h"
|
||||||
|
#include "RageUtil.h"
|
||||||
#include "RageLog.h"
|
#include "RageLog.h"
|
||||||
#include "SpecialFiles.h"
|
#include "SpecialFiles.h"
|
||||||
#include "LuaManager.h"
|
|
||||||
|
|
||||||
//DEFAULTS_INI_PATH = "Data/Defaults.ini"; // these can be overridden
|
//DEFAULTS_INI_PATH = "Data/Defaults.ini"; // these can be overridden
|
||||||
//PREFERENCES_INI_PATH // overlay on Defaults.ini, contains the user's choices
|
//PREFERENCES_INI_PATH // overlay on Defaults.ini, contains the user's choices
|
||||||
@@ -136,7 +136,7 @@ PrefsManager::PrefsManager() :
|
|||||||
m_sCurrentGame ( "CurrentGame", "" ),
|
m_sCurrentGame ( "CurrentGame", "" ),
|
||||||
|
|
||||||
m_sAnnouncer ( "Announcer", "" ),
|
m_sAnnouncer ( "Announcer", "" ),
|
||||||
m_sTheme ( "Theme", "" ),
|
m_sTheme ( "Theme", SpecialFiles::BASE_THEME_NAME ),
|
||||||
m_sDefaultModifiers ( "DefaultModifiers", "" ),
|
m_sDefaultModifiers ( "DefaultModifiers", "" ),
|
||||||
|
|
||||||
m_bWindowed ( "Windowed", TRUE_IF_DEBUG ),
|
m_bWindowed ( "Windowed", TRUE_IF_DEBUG ),
|
||||||
@@ -345,6 +345,8 @@ void PrefsManager::RestoreGamePrefs()
|
|||||||
ReadPrefsFromFile( SpecialFiles::STATIC_INI_PATH, GetPreferencesSection(), true );
|
ReadPrefsFromFile( SpecialFiles::STATIC_INI_PATH, GetPreferencesSection(), true );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PrefsManager::GamePrefs::GamePrefs() : m_sAnnouncer(""), m_sTheme(SpecialFiles::BASE_THEME_NAME), m_sDefaultModifiers("") {}
|
||||||
|
|
||||||
void PrefsManager::ReadPrefsFromDisk()
|
void PrefsManager::ReadPrefsFromDisk()
|
||||||
{
|
{
|
||||||
ReadDefaultsFromFile( SpecialFiles::DEFAULTS_INI_PATH, GetPreferencesSection() );
|
ReadDefaultsFromFile( SpecialFiles::DEFAULTS_INI_PATH, GetPreferencesSection() );
|
||||||
|
|||||||
@@ -3,9 +3,10 @@
|
|||||||
#ifndef PREFSMANAGER_H
|
#ifndef PREFSMANAGER_H
|
||||||
#define PREFSMANAGER_H
|
#define PREFSMANAGER_H
|
||||||
|
|
||||||
#include "PlayerNumber.h"
|
|
||||||
#include "GameConstantsAndTypes.h"
|
#include "GameConstantsAndTypes.h"
|
||||||
|
#include "PlayerNumber.h"
|
||||||
#include "Preference.h"
|
#include "Preference.h"
|
||||||
|
|
||||||
class IniFile;
|
class IniFile;
|
||||||
|
|
||||||
const int MAX_SONGS_PER_PLAY = 7;
|
const int MAX_SONGS_PER_PLAY = 7;
|
||||||
@@ -92,6 +93,9 @@ protected:
|
|||||||
void RestoreGamePrefs();
|
void RestoreGamePrefs();
|
||||||
struct GamePrefs
|
struct GamePrefs
|
||||||
{
|
{
|
||||||
|
// See GamePrefs::GamePrefs in PrefsManager.cpp for some default settings
|
||||||
|
GamePrefs();
|
||||||
|
|
||||||
RString m_sAnnouncer;
|
RString m_sAnnouncer;
|
||||||
RString m_sTheme;
|
RString m_sTheme;
|
||||||
RString m_sDefaultModifiers;
|
RString m_sDefaultModifiers;
|
||||||
|
|||||||
@@ -253,7 +253,6 @@ static void DisplayResolutionChoices( vector<RString> &out )
|
|||||||
|
|
||||||
static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
|
static void Theme( int &sel, bool ToSel, const ConfOption *pConfOption )
|
||||||
{
|
{
|
||||||
// TODO FIXME: The default theme is not correctly set to "default". It is set to "". Where do we change that?
|
|
||||||
vector<RString> choices;
|
vector<RString> choices;
|
||||||
pConfOption->MakeOptionsList( choices );
|
pConfOption->MakeOptionsList( choices );
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user