mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-16 06:39:17 +00:00
STARTREK: Fix memory leak in drawAllSprites
This commit is contained in:
parent
c3bd0347ad
commit
aa41f89395
@ -705,7 +705,7 @@ void StarTrekEngine::checkTouchedLoadingZone(int16 x, int16 y) {
|
||||
|
||||
/**
|
||||
* Updates any nonzero away mission timers, and invokes ACTION_TIMER_EXPIRED when any one
|
||||
* reached 0.
|
||||
* reaches 0.
|
||||
*/
|
||||
void StarTrekEngine::updateAwayMissionTimers() {
|
||||
for (int i = 0; i < 8; i++) {
|
||||
|
@ -542,6 +542,8 @@ void Graphics::drawAllSprites(bool updateScreen) {
|
||||
_vm->_system->copyRectToScreen((byte *)surface.getPixels() + offset, SCREEN_WIDTH, r.left, r.top, r.width(), r.height());
|
||||
}
|
||||
|
||||
surface.free();
|
||||
|
||||
if (updateScreen) {
|
||||
// Check if there are any pending updates to the mouse.
|
||||
if (_mouseBitmap != _mouseBitmapLastFrame) {
|
||||
|
@ -418,7 +418,6 @@ exitMenu:
|
||||
case Common::KEYCODE_SPACE:
|
||||
case Common::KEYCODE_F2: // Exit menu without selecting anything
|
||||
goto exitMenu;
|
||||
goto exitMenu;
|
||||
|
||||
case Common::KEYCODE_RETURN:
|
||||
case Common::KEYCODE_KP_ENTER:
|
||||
|
@ -207,7 +207,7 @@ String StarTrekEngine::playTextAudio(const String &str) {
|
||||
|
||||
/**
|
||||
* @param rclickCancelsChoice If true, right-clicks return "-1" as choice instead of
|
||||
* whetever was selected.
|
||||
* whatever was selected.
|
||||
*/
|
||||
int StarTrekEngine::showText(TextGetterFunc textGetter, uintptr var, int xoffset, int yoffset, int textColor, bool loopChoices, int maxTextLines, bool rclickCancelsChoice) {
|
||||
int16 tmpTextDisplayMode = _textDisplayMode;
|
||||
|
Loading…
Reference in New Issue
Block a user