[Scummvm-git-logs] scummvm master -> 191b7c8b284f15ead21c358394f20f4f7deb2b5c
AndywinXp
noreply at scummvm.org
Thu Jun 26 16:04:58 UTC 2025
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://api.github.com/repos/scummvm/scummvm .
Summary:
191b7c8b28 LASTEXPRESS: Fix valgrind issues
Commit: 191b7c8b284f15ead21c358394f20f4f7deb2b5c
https://github.com/scummvm/scummvm/commit/191b7c8b284f15ead21c358394f20f4f7deb2b5c
Author: AndywinXp (andywinxp at gmail.com)
Date: 2025-06-26T18:04:49+02:00
Commit Message:
LASTEXPRESS: Fix valgrind issues
Courtesy of eriktorbjorn
Changed paths:
engines/lastexpress/data/archive.cpp
engines/lastexpress/debug.cpp
engines/lastexpress/graphics.cpp
engines/lastexpress/menu/menu.cpp
diff --git a/engines/lastexpress/data/archive.cpp b/engines/lastexpress/data/archive.cpp
index 69c484b9b28..91fc527b875 100644
--- a/engines/lastexpress/data/archive.cpp
+++ b/engines/lastexpress/data/archive.cpp
@@ -526,6 +526,8 @@ Seq *ArchiveManager::loadSeq(const char *filename, uint8 ticksToWaitUntilCycleRe
seqDataStream->readUint32LE(); // Empty "next" sprite pointer
}
+ delete seqDataStream;
+
// Where 68 is the original size of the Sprite struct and 8 is the
// offset from the start of the sequence data to the begining of the
// sprite data...
diff --git a/engines/lastexpress/debug.cpp b/engines/lastexpress/debug.cpp
index 4866b2533a0..3965a7f90a2 100644
--- a/engines/lastexpress/debug.cpp
+++ b/engines/lastexpress/debug.cpp
@@ -451,6 +451,8 @@ void LogicManager::renderCurrentSceneDebugger() {
_state->_textureID = g_system->getImGuiTexture(temp);
+ temp.free();
+
ImVec2 imagePos = ImGui::GetCursorScreenPos();
ImVec2 imageSize(640, 480);
@@ -498,25 +500,6 @@ void LogicManager::renderCurrentSceneDebugger() {
ImU32 rectColor = IM_COL32(255, 0, 0, 100); // Semi-transparent red
ImU32 borderColor = IM_COL32(255, 0, 0, 255); // Solid red border
- // Different colors for different cursor types
- //switch (currentLink->cursor) {
- //case 0:
- // borderColor = IM_COL32(255, 0, 0, 255);
- // break; // Red
- //case 1:
- // borderColor = IM_COL32(0, 255, 0, 255);
- // break; // Green
- //case 2:
- // borderColor = IM_COL32(0, 0, 255, 255);
- // break; // Blue
- //case 3:
- // borderColor = IM_COL32(255, 255, 0, 255);
- // break; // Yellow
- //default:
- // borderColor = IM_COL32(255, 0, 255, 255);
- // break; // Magenta
- //}
-
// Highlight hovered link...
if (isHovered) {
rectColor = IM_COL32(255, 255, 255, 150);
diff --git a/engines/lastexpress/graphics.cpp b/engines/lastexpress/graphics.cpp
index 6e4ca945d38..709fb96c5c4 100644
--- a/engines/lastexpress/graphics.cpp
+++ b/engines/lastexpress/graphics.cpp
@@ -41,7 +41,9 @@ GraphicsManager::GraphicsManager(LastExpressEngine *engine) {
_renderBox2.height = 480;
}
-GraphicsManager::~GraphicsManager() {}
+GraphicsManager::~GraphicsManager() {
+ _screenSurface.free();
+}
bool GraphicsManager::acquireSurface() {
// This function is technically useless, but I'm keeping it
diff --git a/engines/lastexpress/menu/menu.cpp b/engines/lastexpress/menu/menu.cpp
index a4f8c3e7b98..b037e63cc2f 100644
--- a/engines/lastexpress/menu/menu.cpp
+++ b/engines/lastexpress/menu/menu.cpp
@@ -67,6 +67,8 @@ void Menu::doEgg(bool doSaveGame, int type, int32 time) {
while (_engine->getSoundFrameCounter() < delay) {
if (_engine->mouseHasRightClicked())
break;
+
+ _engine->waitForTimer(4);
_engine->getSoundManager()->soundThread();
}
}
More information about the Scummvm-git-logs
mailing list