[Scummvm-git-logs] scummvm master -> 10c3eb8ebc59fc6fd68f3a187b3433f31dd63ba2
sev-
noreply at scummvm.org
Sat Mar 25 16:31:36 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:
b0dbb83a84 NEWS: Mention new GUI additions
10c3eb8ebc GUI: Fix crash in TextViewer
Commit: b0dbb83a8452f144aabc896d2e9d4862a20e334b
https://github.com/scummvm/scummvm/commit/b0dbb83a8452f144aabc896d2e9d4862a20e334b
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-25T17:31:15+01:00
Commit Message:
NEWS: Mention new GUI additions
Changed paths:
NEWS.md
diff --git a/NEWS.md b/NEWS.md
index 2bbd10c25ce..c86591cdc44 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -55,6 +55,8 @@ For a more comprehensive changelog of the latest experimental code, see:
General:
- Fixed playback speed for Theora videos.
+ - Added scummvm.log file viewer.
+ - Exposed ScummVM debug level in the GUI (Misc tab).
AGI:
- Restored possibility to pick arbitrary render mode in Game Options.
Commit: 10c3eb8ebc59fc6fd68f3a187b3433f31dd63ba2
https://github.com/scummvm/scummvm/commit/10c3eb8ebc59fc6fd68f3a187b3433f31dd63ba2
Author: Eugene Sandulenko (sev at scummvm.org)
Date: 2023-03-25T17:31:27+01:00
Commit Message:
GUI: Fix crash in TextViewer
Changed paths:
gui/textviewer.cpp
diff --git a/gui/textviewer.cpp b/gui/textviewer.cpp
index 6748ac401dc..c3a7b386c1b 100644
--- a/gui/textviewer.cpp
+++ b/gui/textviewer.cpp
@@ -157,6 +157,14 @@ void TextViewerDialog::handleCommand(CommandSender *sender, uint32 cmd, uint32 d
switch (cmd) {
case kSetPositionCmd:
_currentPos = _scrollBar->_currentPos;
+
+ if (_currentPos < 0) {
+ _currentPos = 0;
+ }
+ if ((_currentPos + _linesPerPage) >= (int)_linesArray.size()) {
+ _currentPos = MAX<int32>(_linesArray.size() - _linesPerPage, 0);
+ }
+
drawDialog(kDrawLayerForeground);
break;
default:
@@ -199,7 +207,7 @@ void TextViewerDialog::handleKeyDown(Common::KeyState state) {
_currentPos = 0;
}
if ((_currentPos + _linesPerPage) >= (int)_linesArray.size()) {
- _currentPos = _linesArray.size() - _linesPerPage;
+ _currentPos = MAX<int32>(_linesArray.size() - _linesPerPage, 0);
}
drawDialog(kDrawLayerForeground);
More information about the Scummvm-git-logs
mailing list