aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authoragent-q2011-05-21 15:45:51 +0100
committeragent-q2011-05-21 15:45:51 +0100
commit92a71f7452b83b5491ba0862d8da9f23055fd5bd (patch)
treed34c1e20563cc896a6b60750a751b421a35b03cc /gui
parentcb8460e92669da540eb54b80c249a7ba1f7df45a (diff)
downloadscummvm-rg350-92a71f7452b83b5491ba0862d8da9f23055fd5bd.tar.gz
scummvm-rg350-92a71f7452b83b5491ba0862d8da9f23055fd5bd.tar.bz2
scummvm-rg350-92a71f7452b83b5491ba0862d8da9f23055fd5bd.zip
DS: Port of changes from branch-1-2-0 that I should really have moved into the trunk.
"DS: Prevent the command line help string from being included in the binary." 5f3a90a5f6911188b8d1ded08dbdf6d233e9eb7b "GUI: Allow disabling of Mass Add dialog. Saves a few Kb of binary size on the DS, and is not particularly useful on that platform." 240ff87cf4472538d25a1c5628c8d15f1791ab1c "GUI: Don't search for theme zip files on startup when running on the DS. Themes aren't supported anyway, and the search severely delays startup." fe3b18ce0df03117081e83d99f4a2cbd864d3286
Diffstat (limited to 'gui')
-rw-r--r--gui/gui-manager.cpp9
-rw-r--r--gui/launcher.cpp3
-rw-r--r--gui/massadd.cpp5
3 files changed, 16 insertions, 1 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
+
+