diff options
author | Treeki <treeki@gmail.com> | 2013-04-16 18:44:20 +0200 |
---|---|---|
committer | Treeki <treeki@gmail.com> | 2013-04-16 18:44:20 +0200 |
commit | 3fec1b6193724c0a7c5ca3ea95a9d88a7e19cd90 (patch) | |
tree | 74c2c90faf64553cc4139ed6d34bde04bad18084 | |
parent | b5e70c50c39612ad480ec7f39be60c82f9c85c1c (diff) | |
download | kamek-3fec1b6193724c0a7c5ca3ea95a9d88a7e19cd90.tar.gz kamek-3fec1b6193724c0a7c5ca3ea95a9d88a7e19cd90.zip |
fix cutscene memory leak and widescreen issues
Diffstat (limited to '')
-rw-r--r-- | src/cutScene.cpp | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/cutScene.cpp b/src/cutScene.cpp index 7b14ccb..29f295e 100644 --- a/src/cutScene.cpp +++ b/src/cutScene.cpp @@ -80,6 +80,11 @@ int dScCutScene_c::onDelete() { if (layout) return layout->free(); + for (int i = 0; i < data->sceneCount; i++) { + sceneLoaders[i].unload(); + } + settingsLoader.unload(); + return true; } @@ -259,9 +264,14 @@ int dScCutScene_c::onExecute() { layout->enableNonLoopAnim(0); u8 widescreenFlag = data->scenes[nextScene]->widescreenFlag; - if (widescreenFlag == 1) { + if (widescreenFlag == 1 || widescreenFlag == 3) { // Native on 16:9, letterboxed on 4:3 - if (!IsWideScreen()) { + if (IsWideScreen()) { + if (widescreenFlag == 3) { + layout->layout.rootPane->trans.x = -100.0f; + layout->layout.rootPane->scale.x = 0.75f; + } + } else { layout->clippingEnabled = true; layout->clipX = 0; layout->clipY = 52; |