diff options
Diffstat (limited to 'engines')
-rw-r--r-- | engines/pink/director.cpp | 16 | ||||
-rw-r--r-- | engines/pink/director.h | 3 |
2 files changed, 16 insertions, 3 deletions
diff --git a/engines/pink/director.cpp b/engines/pink/director.cpp index bb59ff93ae..1baf239dd3 100644 --- a/engines/pink/director.cpp +++ b/engines/pink/director.cpp @@ -79,6 +79,15 @@ static const Graphics::MacMenuData menuSubItems[] = { }; */ +static void redrawCallback(void *ref) { + Director *dir = (Director *)ref; + + if (dir->getWndManager().isMenuActive()) { + dir->addDirtyRect(Common::Rect(0, 0, 640, 480)); + dir->draw(false); + } +} + Director::Director() : _surface(640, 480), _textRendered(false) { _wm.setScreen(&_surface); @@ -86,6 +95,7 @@ Director::Director() Graphics::kWMModeForceBuiltinFonts); _wm.setMenuHotzone(Common::Rect(0, 0, 640, 23)); _wm.setMenuDelay(250000); + _wm.setEngineRedrawCallback(this, redrawCallback); } void Director::update() { @@ -203,7 +213,7 @@ Actor *Director::getActorByPoint(const Common::Point point) { return nullptr; } -void Director::draw() { +void Director::draw(bool blit) { if (!_dirtyRects.empty() || !_textRendered) { mergeDirtyRects(); @@ -219,7 +229,9 @@ void Director::draw() { } _dirtyRects.resize(0); - _surface.update(); + + if (blit) + _surface.update(); } else g_system->updateScreen(); } diff --git a/engines/pink/director.h b/engines/pink/director.h index 7273b6521b..af8dbfc35d 100644 --- a/engines/pink/director.h +++ b/engines/pink/director.h @@ -77,8 +77,9 @@ public: Graphics::MacWindowManager &getWndManager() { return _wm; }; + void draw(bool blit = true); + private: - void draw(); void mergeDirtyRects(); void drawRect(const Common::Rect &rect); |