diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gui-manager.cpp | 9 | ||||
-rw-r--r-- | gui/launcher.cpp | 3 | ||||
-rw-r--r-- | gui/massadd.cpp | 5 | ||||
-rw-r--r-- | gui/options.cpp | 4 | ||||
-rw-r--r-- | gui/saveload.cpp | 13 |
5 files changed, 30 insertions, 4 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index 19ca66b7b1..edab31dfaa 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -77,6 +77,14 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _stateIsSaved(false), ConfMan.registerDefault("gui_renderer", ThemeEngine::findModeConfigName(ThemeEngine::_defaultRendererMode)); ThemeEngine::GraphicsMode gfxMode = (ThemeEngine::GraphicsMode)ThemeEngine::findMode(ConfMan.get("gui_renderer")); +#ifdef __DS__ + // Searching for the theme file takes ~10 seconds on the DS. + // Disable this search here because external themes are not supported. + if (!loadNewTheme("builtin", gfxMode)) { + // Loading the built-in theme failed as well. Bail out + error("Failed to load any GUI theme, aborting"); + } +#else // Try to load the theme if (!loadNewTheme(themefile, gfxMode)) { // Loading the theme failed, try to load the built-in theme @@ -85,6 +93,7 @@ GuiManager::GuiManager() : _redrawStatus(kRedrawDisabled), _stateIsSaved(false), error("Failed to load any GUI theme, aborting"); } } +#endif } GuiManager::~GuiManager() { diff --git a/gui/launcher.cpp b/gui/launcher.cpp index aed57decd3..c80852c77b 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -721,6 +721,8 @@ void LauncherDialog::updateListing() { void LauncherDialog::addGame() { int modifiers = g_system->getEventManager()->getModifierState(); + +#ifndef DISABLE_MASS_ADD const bool massAdd = (modifiers & Common::KBD_SHIFT) != 0; if (massAdd) { @@ -749,6 +751,7 @@ void LauncherDialog::addGame() { updateButtons(); return; } +#endif // Allow user to add a new game to the list. // 1) show a dir selection dialog which lets the user pick the directory diff --git a/gui/massadd.cpp b/gui/massadd.cpp index c5af6c6bb4..ba841158a4 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -34,7 +34,7 @@ #include "gui/widget.h" #include "gui/widgets/list.h" - +#ifndef DISABLE_MASS_ADD namespace GUI { /* @@ -264,3 +264,6 @@ void MassAddDialog::handleTickle() { } // End of namespace GUI +#endif // DISABLE_MASS_ADD + + diff --git a/gui/options.cpp b/gui/options.cpp index 547ab0f3c6..d2369b9764 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -141,8 +141,8 @@ void OptionsDialog::init() { _subSpeedDesc = 0; _subSpeedSlider = 0; _subSpeedLabel = 0; - _oldTheme = ConfMan.get("gui_theme"); - + _oldTheme = g_gui.theme()->getThemeId(); + // Retrieve game GUI options _guioptions = 0; if (ConfMan.hasKey("guioptions", _domain)) { diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 41b6018e3b..9e3c9231f2 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -362,8 +362,19 @@ void SaveLoadChooser::updateSaveList() { } // Fill the rest of the save slots with empty saves + + int maximumSaveSlots = (*_plugin)->getMaximumSaveSlot(); + +#ifdef __DS__ + // Low memory on the DS means too many save slots are impractical, so limit + // the maximum here. + if (maximumSaveSlots > 99) { + maximumSaveSlots = 99; + } +#endif + Common::String emptyDesc; - for (int i = curSlot; i <= (*_plugin)->getMaximumSaveSlot(); i++) { + for (int i = curSlot; i <= maximumSaveSlots; i++) { saveNames.push_back(emptyDesc); SaveStateDescriptor dummySave(i, ""); _saveList.push_back(dummySave); |