From d7af4a8c1cb6797507a633874ed9e751730e0a6f Mon Sep 17 00:00:00 2001 From: Ben Castricum Date: Fri, 13 Sep 2019 09:29:25 +0200 Subject: ENGINES: More consistent error messages --- engines/engine.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'engines') diff --git a/engines/engine.cpp b/engines/engine.cpp index 8469c72c4d..a1df63bbc6 100644 --- a/engines/engine.cpp +++ b/engines/engine.cpp @@ -309,7 +309,7 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) { // Error out on size switch failure if (gfxError & OSystem::kTransactionSizeChangeFailed) { Common::String message; - message = Common::String::format("Could not switch to resolution: '%dx%d'.", width, height); + message = Common::String::format(_("Could not switch to resolution '%dx%d'."), width, height); GUIErrorMessage(message); error("%s", message.c_str()); @@ -326,18 +326,16 @@ void initGraphics(int width, int height, const Graphics::PixelFormat *format) { #endif if (gfxError & OSystem::kTransactionModeSwitchFailed) { - Common::String message = _("Could not switch to video mode: '"); - message += ConfMan.get("gfx_mode"); - message += "'."; + Common::String message; + message = Common::String::format(_("Could not switch to video mode '%s'."), ConfMan.get("gfx_mode").c_str()); GUI::MessageDialog dialog(message); dialog.runModal(); } if (gfxError & OSystem::kTransactionStretchModeSwitchFailed) { - Common::String message = _("Could not switch to stretch mode: '"); - message += ConfMan.get("stretch_mode"); - message += "'."; + Common::String message; + message = Common::String::format(_("Could not switch to stretch mode '%s'."), ConfMan.get("stretch_mode").c_str()); GUI::MessageDialog dialog(message); dialog.runModal(); @@ -531,7 +529,7 @@ void Engine::openMainMenuDialog() { // Load savegame after main menu execution // (not from inside the menu loop to avoid - // mouse cursor glitches and simliar bugs, + // mouse cursor glitches and similar bugs, // e.g. #2822778). if (_saveSlotToLoad >= 0) { Common::Error status = loadGameState(_saveSlotToLoad); -- cgit v1.2.3