diff options
author | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
---|---|---|
committer | Alejandro Marzini | 2010-07-13 04:31:15 +0000 |
commit | 609e08d5dbae3179eddf981abe73d69009432de4 (patch) | |
tree | cddbd0a0e69eaa53b85f98f96dc410a307773f08 /base | |
parent | 8b6a670391f1b5103e3761d78eef8f41d64cf8cd (diff) | |
parent | 03c0faa5d76f547603ee6389cdf958e2a6f0f43d (diff) | |
download | scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.gz scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.tar.bz2 scummvm-rg350-609e08d5dbae3179eddf981abe73d69009432de4.zip |
Merged from trunk, from Rev 49499 to HEAD
svn-id: r50840
Diffstat (limited to 'base')
-rw-r--r-- | base/commandLine.cpp | 6 | ||||
-rw-r--r-- | base/internal_version.h | 5 | ||||
-rw-r--r-- | base/internal_version.h.in | 5 | ||||
-rw-r--r-- | base/main.cpp | 39 | ||||
-rw-r--r-- | base/plugins.cpp | 5 |
5 files changed, 42 insertions, 18 deletions
diff --git a/base/commandLine.cpp b/base/commandLine.cpp index 1c548d3f50..e795b82d0a 100644 --- a/base/commandLine.cpp +++ b/base/commandLine.cpp @@ -32,8 +32,6 @@ #include "common/system.h" #include "common/fs.h" -#include "sound/mididrv.h" - #include "gui/ThemeEngine.h" #define DETECTOR_TESTING_HACK @@ -61,7 +59,7 @@ static const char HELP_STRING[] = " -h, --help Display a brief help text and exit\n" " -z, --list-games Display list of supported games and exit\n" " -t, --list-targets Display list of configured targets and exit\n" - " --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n" + " --list-saves=TARGET Display a list of savegames for the game (TARGET) specified\n" "\n" " -c, --config=CONFIG Use alternate configuration file\n" " -p, --path=PATH Path to where the game is installed\n" @@ -364,8 +362,6 @@ Common::String parseCommandLine(Common::StringMap &settings, int argc, const cha END_OPTION DO_OPTION('e', "music-driver") - if (MidiDriver::findMusicDriver(option) == 0) - usage("Unrecognized music driver '%s'", option); END_OPTION DO_LONG_OPTION_INT("output-rate") diff --git a/base/internal_version.h b/base/internal_version.h index bdd0474c2b..2e6b7a24ad 100644 --- a/base/internal_version.h +++ b/base/internal_version.h @@ -2,4 +2,9 @@ #define SCUMMVM_SVN_REVISION #endif +#ifdef RELEASE_BUILD +#undef SCUMMVM_SVN_REVISION +#define SCUMMVM_SVN_REVISION +#endif + #define SCUMMVM_VERSION "1.2.0svn" SCUMMVM_SVN_REVISION diff --git a/base/internal_version.h.in b/base/internal_version.h.in index 1b7e5ed147..4eecf90d87 100644 --- a/base/internal_version.h.in +++ b/base/internal_version.h.in @@ -2,4 +2,9 @@ #define SCUMMVM_SVN_REVISION #endif +#ifdef RELEASE_BUILD +#undef SCUMMVM_SVN_REVISION +#define SCUMMVM_SVN_REVISION +#endif + #define SCUMMVM_VERSION "@VERSION@" SCUMMVM_SVN_REVISION diff --git a/base/main.cpp b/base/main.cpp index 7f3b9467b3..477f2afcb1 100644 --- a/base/main.cpp +++ b/base/main.cpp @@ -47,11 +47,14 @@ #include "common/fs.h" #include "common/system.h" #include "common/tokenizer.h" +#include "common/translation.h" #include "gui/GuiManager.h" #include "gui/message.h" #include "gui/error.h" +#include "sound/mididrv.h" + #include "backends/keymapper/keymapper.h" #if defined(_WIN32_WCE) @@ -100,7 +103,7 @@ static const EnginePlugin *detectPlugin() { // Query the plugins and find one that will handle the specified gameid printf("User picked target '%s' (gameid '%s')...\n", ConfMan.getActiveDomainName().c_str(), gameid.c_str()); - printf(" Looking for a plugin supporting this gameid... "); + printf("%s", " Looking for a plugin supporting this gameid... "); GameDescriptor game = EngineMan.findGame(gameid, &plugin); if (plugin == 0) { @@ -139,7 +142,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const // Is a separate dialog here still required? //GUI::displayErrorDialog("ScummVM could not find any game in the specified directory!"); - const char *errMsg = Common::errorToString(err); + const char *errMsg = _(Common::errorToString(err)); warning("%s failed to instantiate engine: %s (target '%s', path '%s')", plugin->getName(), @@ -198,7 +201,7 @@ static Common::Error runGame(const EnginePlugin *plugin, OSystem &system, const while (!tokenizer.empty()) { Common::String token = tokenizer.nextToken(); if (!DebugMan.enableDebugChannel(token)) - warning("Engine does not support debug level '%s'", token.c_str()); + warning(_("Engine does not support debug level '%s'"), token.c_str()); } // Inform backend that the engine is about to be run @@ -266,22 +269,22 @@ static void setupKeymapper(OSystem &system) { mapper->registerHardwareKeySet(keySet); // Now create the global keymap - act = new Action(globalMap, "MENU", "Menu", kGenericActionType, kSelectKeyType); + act = new Action(globalMap, "MENU", _("Menu"), kGenericActionType, kSelectKeyType); act->addKeyEvent(KeyState(KEYCODE_F5, ASCII_F5, 0)); - act = new Action(globalMap, "SKCT", "Skip", kGenericActionType, kActionKeyType); + act = new Action(globalMap, "SKCT", _("Skip"), kGenericActionType, kActionKeyType); act->addKeyEvent(KeyState(KEYCODE_ESCAPE, ASCII_ESCAPE, 0)); - act = new Action(globalMap, "PAUS", "Pause", kGenericActionType, kStartKeyType); + act = new Action(globalMap, "PAUS", _("Pause"), kGenericActionType, kStartKeyType); act->addKeyEvent(KeyState(KEYCODE_SPACE, ' ', 0)); - act = new Action(globalMap, "SKLI", "Skip line", kGenericActionType, kActionKeyType); + act = new Action(globalMap, "SKLI", _("Skip line"), kGenericActionType, kActionKeyType); act->addKeyEvent(KeyState(KEYCODE_PERIOD, '.', 0)); - act = new Action(globalMap, "VIRT", "Display keyboard", kVirtualKeyboardActionType); + act = new Action(globalMap, "VIRT", _("Display keyboard"), kVirtualKeyboardActionType); act->addKeyEvent(KeyState(KEYCODE_F7, ASCII_F7, 0)); - act = new Action(globalMap, "REMP", "Remap keys", kKeyRemapActionType); + act = new Action(globalMap, "REMP", _("Remap keys"), kKeyRemapActionType); act->addKeyEvent(KeyState(KEYCODE_F8, ASCII_F8, 0)); mapper->addGlobalKeymap(globalMap); @@ -317,6 +320,8 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { // Update the config file ConfMan.set("versioninfo", gScummVMVersion, Common::ConfigManager::kApplicationDomain); + // Enable translation + TransMan.setLanguage(ConfMan.get("gui_language").c_str()); // Load and setup the debuglevel and the debug flags. We do this at the // soonest possible moment to ensure debug output starts early on, if @@ -336,6 +341,16 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { // Load the plugins. PluginManager::instance().loadPlugins(); + // If we received an invalid music parameter via command line we check this here. + // We can't check this before loading the music plugins. + // On the other hand we cannot load the plugins before we know the file paths (in case of external plugins). + if (settings.contains("music-driver")) { + if (MidiDriver::getMusicType(MidiDriver::getDeviceHandle(settings["music-driver"])) == MT_INVALID) { + warning("Unrecognized music driver '%s'. Switching to default device.", settings["music-driver"].c_str()); + settings["music-driver"] = "auto"; + } + } + // Process the remaining command line settings. Must be done after the // config file and the plugins have been loaded. Common::Error res; @@ -385,7 +400,7 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { // Did an error occur ? if (result != Common::kNoError) { // Shows an informative error dialog if starting the selected game failed. - GUI::displayErrorDialog(result, "Error running game:"); + GUI::displayErrorDialog(result, _("Error running game:")); } // Quit unless an error occurred, or Return to launcher was requested @@ -411,8 +426,8 @@ extern "C" int scummvm_main(int argc, const char * const argv[]) { } else { // A dialog would be nicer, but we don't have any // screen to draw on yet. - warning("Could not find any engine capable of running the selected game"); - GUI::displayErrorDialog("Could not find any engine capable of running the selected game"); + warning("%s", _("Could not find any engine capable of running the selected game")); + GUI::displayErrorDialog(_("Could not find any engine capable of running the selected game")); } // reset the graphics to default diff --git a/base/plugins.cpp b/base/plugins.cpp index 6c80da65d4..a6acd7e449 100644 --- a/base/plugins.cpp +++ b/base/plugins.cpp @@ -167,6 +167,7 @@ public: // Music plugins // TODO: Use defines to disable or enable each MIDI driver as a // static/dynamic plugin, like it's done for the engines + LINK_PLUGIN(AUTO) LINK_PLUGIN(NULL) #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__) LINK_PLUGIN(WINDOWS) @@ -174,7 +175,7 @@ public: #if defined(UNIX) && defined(USE_ALSA) LINK_PLUGIN(ALSA) #endif - #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__) + #if defined(UNIX) && !defined(__BEOS__) && !defined(__MAEMO__) && !defined(__MINT__) && !defined(__ANDROID__) LINK_PLUGIN(SEQ) #endif #if defined(__MINT__) @@ -204,6 +205,8 @@ public: LINK_PLUGIN(MT32) #endif LINK_PLUGIN(ADLIB) + LINK_PLUGIN(PCSPK) + LINK_PLUGIN(PCJR) LINK_PLUGIN(TOWNS) #if defined (UNIX) LINK_PLUGIN(TIMIDITY) |