[Scummvm-git-logs] scummvm master -> 07a52898eddfdad73ac745af7ee399b749b65746
sev-
noreply at scummvm.org
Sat Mar 25 18:44:51 UTC 2023
This automated email contains information about 2 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
d1203ffe0a BASE: Fix --logfile command line option
07a52898ed GUI: Reflect command line override for the log path
Commit: d1203ffe0ac2b52ca0c46c9e101bca0c36caf0f3
https://github.com/scummvm/scummvm/commit/d1203ffe0ac2b52ca0c46c9e101bca0c36caf0f3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-25T19:43:32+01:00
Commit Message:
BASE: Fix --logfile command line option
It was plainly not functional. We were never passing it to backend
Changed paths:
base/commandLine.cpp
diff --git a/base/commandLine.cpp b/base/commandLine.cpp
index 9e5a9fb28d4..5963c0445fb 100644
--- a/base/commandLine.cpp
+++ b/base/commandLine.cpp
@@ -1928,6 +1928,7 @@ bool processSettings(Common::String &command, Common::StringMap &settings, Commo
// Finally, store the command line settings into the config manager.
static const char * const sessionSettings[] = {
"config",
+ "logfile",
"initial-cfg",
"fullscreen",
"gfx-mode",
Commit: 07a52898eddfdad73ac745af7ee399b749b65746
https://github.com/scummvm/scummvm/commit/07a52898eddfdad73ac745af7ee399b749b65746
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-25T19:44:15+01:00
Commit Message:
GUI: Reflect command line override for the log path
Changed paths:
gui/options.cpp
gui/options.h
diff --git a/gui/options.cpp b/gui/options.cpp
index 81ee9377e82..64c8a80ffd7 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2493,7 +2493,19 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
configPathWidget->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
Common::U32String logPath = g_system->getDefaultLogFileName();
- new StaticTextWidget(boss, prefix + "LogPath", _("ScummVM log path: ") + logPath, logPath);
+ bool colorOverride = false;
+
+ if (ConfMan.hasKey("logfile")) {
+ logPath = ConfMan.get("logfile");
+
+ if (ConfMan.isKeyTemporary("logfile"))
+ colorOverride = true;
+ }
+ _logPath = new StaticTextWidget(boss, prefix + "LogPath", _("ScummVM log path: ") + logPath, logPath);
+
+ if (colorOverride)
+ _logPath->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
+
new ButtonWidget(boss, prefix + "ViewButton", _("View"), Common::U32String(), kViewLogCmd);
Common::U32String browserPath = _("<default>");
@@ -3244,7 +3256,14 @@ void GlobalOptionsDialog::handleCommand(CommandSender *sender, uint32 cmd, uint3
break;
case kViewLogCmd: {
- TextViewerDialog viewer(g_system->getDefaultLogFileName());
+ Common::String logPath;
+
+ if (ConfMan.hasKey("logfile"))
+ logPath = ConfMan.get("logfile");
+ else
+ logPath = g_system->getDefaultLogFileName();
+
+ TextViewerDialog viewer(logPath);
viewer.runModal();
g_gui.scheduleTopDialogRedraw();
break;
diff --git a/gui/options.h b/gui/options.h
index 25e5d46aa39..b1e7ccf3856 100644
--- a/gui/options.h
+++ b/gui/options.h
@@ -286,6 +286,7 @@ protected:
#endif
StaticTextWidget *_browserPath;
ButtonWidget *_browserPathClearButton;
+ StaticTextWidget *_logPath;
void addPathsControls(GuiObject *boss, const Common::String &prefix, bool lowres);
More information about the Scummvm-git-logs
mailing list