mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-13 12:39:56 +00:00
parent
4073e7f8f8
commit
61c96353cf
@ -886,6 +886,17 @@ public:
|
||||
*/
|
||||
virtual Common::SaveFileManager *getSavefileManager() = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Return String which is used for backend-specific addition to theme
|
||||
* config.
|
||||
*
|
||||
* Typical usage is to disable unneeded GUI widgets or defining
|
||||
* theme-specific tab.
|
||||
*/
|
||||
virtual Common::String getExtraThemeConfig() {
|
||||
return "";
|
||||
}
|
||||
//@}
|
||||
};
|
||||
|
||||
|
@ -70,7 +70,7 @@ bool ThemeClassic::init() {
|
||||
|
||||
if (isThemeLoadingRequired()) {
|
||||
loadTheme(_defaultConfig);
|
||||
loadTheme(_configFile, false);
|
||||
loadTheme(_configFile, false, true);
|
||||
|
||||
setupConfig();
|
||||
}
|
||||
|
@ -135,7 +135,7 @@ bool ThemeModern::init() {
|
||||
|
||||
if (isThemeLoadingRequired()) {
|
||||
loadTheme(_defaultConfig);
|
||||
loadTheme(_configFile, false); // Don't reset
|
||||
loadTheme(_configFile, false, true); // Don't reset
|
||||
|
||||
processExtraValues();
|
||||
}
|
||||
|
@ -765,5 +765,16 @@ void Theme::loadTheme(Common::ConfigFile &config, bool reset) {
|
||||
|
||||
debug(3, "Number of variables: %d", _evaluator->getNumVars());
|
||||
}
|
||||
void Theme::loadTheme(Common::ConfigFile &config, bool reset, bool doBackendSpecificPostProcessing) {
|
||||
loadTheme(config, reset);
|
||||
|
||||
if (doBackendSpecificPostProcessing && !g_system->getExtraThemeConfig().empty()) {
|
||||
Common::ConfigFile myConfig;
|
||||
Common::String myConfigINI = g_system->getExtraThemeConfig();
|
||||
Common::MemoryReadStream s((const byte *)myConfigINI.c_str(), strlen(myConfigINI.c_str()));
|
||||
myConfig.loadFromStream(s);
|
||||
loadTheme(myConfig, false);
|
||||
}
|
||||
}
|
||||
|
||||
} // End of namespace GUI
|
||||
|
@ -210,7 +210,7 @@ public:
|
||||
bool isThemeLoadingRequired();
|
||||
bool sectionIsSkipped(Common::ConfigFile &config, const char *name, int w, int h);
|
||||
void loadTheme(Common::ConfigFile &config, bool reset = true);
|
||||
|
||||
void loadTheme(Common::ConfigFile &config, bool reset, bool doBackendSpecificPostProcessing);
|
||||
Eval *_evaluator;
|
||||
|
||||
static bool themeConfigUseable(const Common::String &file, const Common::String &style="", Common::String *cStyle=0, Common::ConfigFile *cfg=0);
|
||||
|
Loading…
Reference in New Issue
Block a user