aboutsummaryrefslogtreecommitdiff
path: root/engines/tony/window.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'engines/tony/window.cpp')
-rw-r--r--engines/tony/window.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/engines/tony/window.cpp b/engines/tony/window.cpp
index a732862854..02991975ce 100644
--- a/engines/tony/window.cpp
+++ b/engines/tony/window.cpp
@@ -40,7 +40,7 @@ namespace Tony {
\****************************************************************************/
RMWindow::RMWindow() {
- _showDirtyRects = false;
+ reset();
}
RMWindow::~RMWindow() {
@@ -55,11 +55,21 @@ RMWindow::~RMWindow() {
void RMWindow::init() {
Graphics::PixelFormat pixelFormat(2, 5, 5, 5, 0, 10, 5, 0, 0);
initGraphics(RM_SX, RM_SY, true, &pixelFormat);
+
+ reset();
+}
+/**
+ * Reset the variables
+ */
+void RMWindow::reset() {
+ _showDirtyRects = false;
_bGrabScreenshot = false;
_bGrabThumbnail = false;
_bGrabMovie = false;
_wiping = false;
+
+ _wThumbBuf = nullptr;
}
void RMWindow::copyRectToScreen(const byte *buf, int pitch, int x, int y, int w, int h) {