[Scummvm-git-logs] scummvm master -> 8952ceaa2fbd0617aa0a4cf06fdb425150941fff

sev- noreply at scummvm.org
Sun Mar 26 22:30:51 UTC 2023


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
20682fdc3c IOS: Report the scummvm.log file location
986076bb13 IOS7: Report the scummvm.log file location
8952ceaa2f GUI: Process empty log path and gracefully process unreadable paths


Commit: 20682fdc3c46c5c878e982d47833bc4af91b30c3
    https://github.com/scummvm/scummvm/commit/20682fdc3c46c5c878e982d47833bc4af91b30c3
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-27T00:24:45+02:00

Commit Message:
IOS: Report the scummvm.log file location

Changed paths:
    backends/platform/iphone/osys_main.h


diff --git a/backends/platform/iphone/osys_main.h b/backends/platform/iphone/osys_main.h
index 965baaf4c4c..2dbd537ba56 100644
--- a/backends/platform/iphone/osys_main.h
+++ b/backends/platform/iphone/osys_main.h
@@ -184,6 +184,8 @@ public:
 
 	virtual void logMessage(LogMessageType::Type type, const char *message);
 
+	virtual Common::String getDefaultLogFileName() { return Common::String("/var/mobile/.scummvm.log"); }
+
 protected:
 	void initVideoContext();
 	void updateOutputSurface();


Commit: 986076bb1399e29b2cc4f8fe964525167cdeec56
    https://github.com/scummvm/scummvm/commit/986076bb1399e29b2cc4f8fe964525167cdeec56
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-27T00:24:46+02:00

Commit Message:
IOS7: Report the scummvm.log file location

Changed paths:
    backends/platform/ios7/ios7_osys_main.h


diff --git a/backends/platform/ios7/ios7_osys_main.h b/backends/platform/ios7/ios7_osys_main.h
index c59a4b87f1d..9b029b721fe 100644
--- a/backends/platform/ios7/ios7_osys_main.h
+++ b/backends/platform/ios7/ios7_osys_main.h
@@ -218,6 +218,8 @@ public:
 
 	bool isConnectionLimited() override;
 
+	virtual Common::String getDefaultLogFileName() { return Common::String("/var/mobile/.scummvm.log"); }
+
 protected:
 	void initVideoContext();
 	void updateOutputSurface();


Commit: 8952ceaa2fbd0617aa0a4cf06fdb425150941fff
    https://github.com/scummvm/scummvm/commit/8952ceaa2fbd0617aa0a4cf06fdb425150941fff
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-27T00:24:46+02:00

Commit Message:
GUI: Process empty log path and gracefully process unreadable paths

Changed paths:
    gui/options.cpp
    gui/textviewer.cpp


diff --git a/gui/options.cpp b/gui/options.cpp
index a20ba56c005..83d63b57f05 100644
--- a/gui/options.cpp
+++ b/gui/options.cpp
@@ -2506,7 +2506,10 @@ void GlobalOptionsDialog::addPathsControls(GuiObject *boss, const Common::String
 	if (colorOverride)
 		_logPath->setFontColor(ThemeEngine::FontColor::kFontColorOverride);
 
-	new ButtonWidget(boss, prefix + "ViewButton", _("View"), Common::U32String(), kViewLogCmd);
+	ButtonWidget *viewButton = new ButtonWidget(boss, prefix + "ViewButton", _("View"), Common::U32String(), kViewLogCmd);
+
+	if (logPath.empty())
+		viewButton->setEnabled(false);
 
 	Common::U32String browserPath = _("<default>");
 	if (ConfMan.hasKey("browser_lastpath"))
diff --git a/gui/textviewer.cpp b/gui/textviewer.cpp
index 65f5353e5fb..ecefb5262c9 100644
--- a/gui/textviewer.cpp
+++ b/gui/textviewer.cpp
@@ -75,6 +75,12 @@ bool TextViewerDialog::loadFile(Common::String &fname) {
 
 	Common::SeekableReadStream *stream = file.createReadStream();
 
+	if (!stream) {
+		warning("TextViewerDialog::loadFile(): Cannot load file %s", fname.c_str());
+
+		return false;
+	}
+
 	warning("TextViewerDialog::loadFile(): File size is: %ld", stream->size());
 
 	_linesArray.clear();




More information about the Scummvm-git-logs mailing list