diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/gui-manager.cpp | 9 | ||||
-rw-r--r-- | gui/launcher.cpp | 5 | ||||
-rw-r--r-- | gui/massadd.cpp | 3 | ||||
-rw-r--r-- | gui/options.cpp | 2 | ||||
-rw-r--r-- | gui/saveload.cpp | 13 |
5 files changed, 28 insertions, 4 deletions
diff --git a/gui/gui-manager.cpp b/gui/gui-manager.cpp index f56a9097d5..af1852d56d 100644 --- a/gui/gui-manager.cpp +++ b/gui/gui-manager.cpp @@ -74,6 +74,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 @@ -82,6 +90,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 792b5bbfbe..86ca3162cb 100644 --- a/gui/launcher.cpp +++ b/gui/launcher.cpp @@ -718,6 +718,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) { @@ -746,6 +748,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 @@ -918,7 +921,7 @@ void LauncherDialog::loadGame(int item) { gameId = _domains[item]; const EnginePlugin *plugin = 0; - + EngineMan.findGame(gameId, &plugin); String target = _domains[item]; diff --git a/gui/massadd.cpp b/gui/massadd.cpp index 7b641d71e5..861be970c4 100644 --- a/gui/massadd.cpp +++ b/gui/massadd.cpp @@ -31,7 +31,7 @@ #include "gui/widget.h" #include "gui/widgets/list.h" - +#ifndef DISABLE_MASS_ADD namespace GUI { /* @@ -264,3 +264,4 @@ void MassAddDialog::handleTickle() { } // End of namespace GUI +#endif // DISABLE_MASS_ADD diff --git a/gui/options.cpp b/gui/options.cpp index 5cb70bc5e4..0c9d03af0c 100644 --- a/gui/options.cpp +++ b/gui/options.cpp @@ -138,7 +138,7 @@ 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; diff --git a/gui/saveload.cpp b/gui/saveload.cpp index 7c7394a71d..460246e5fc 100644 --- a/gui/saveload.cpp +++ b/gui/saveload.cpp @@ -359,8 +359,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); |