From 34c57519489186ae62a28072199b247211c05161 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 Jun 2012 04:13:16 +0200 Subject: KYRA: Reduce amount of updateScreen calls. This fixes some slowdowns in Kyra2 with the OpenGL backend for me. Most of the updateScreen calls saved were introduced by us implementing the original behavior of hiding the mouse before drawing onto the screen and showing it again afterwards, since the mouse cursor is not drawn on the game screen in our implementation (and unlike in the original) this is not necessary. --- engines/kyra/gui_v2.cpp | 10 ---------- 1 file changed, 10 deletions(-) (limited to 'engines/kyra/gui_v2.cpp') diff --git a/engines/kyra/gui_v2.cpp b/engines/kyra/gui_v2.cpp index 65f8bd45e5..1df4149d2e 100644 --- a/engines/kyra/gui_v2.cpp +++ b/engines/kyra/gui_v2.cpp @@ -105,15 +105,11 @@ void GUI_v2::processButton(Button *button) { switch (val1 - 1) { case 0: - _screen->hideMouse(); _screen->drawShape(_screen->_curPage, dataPtr, x, y, button->dimTableIndex, 0x10); - _screen->showMouse(); break; case 1: - _screen->hideMouse(); _screen->printText((const char *)dataPtr, x, y, val2, val3); - _screen->showMouse(); break; case 3: @@ -122,22 +118,16 @@ void GUI_v2::processButton(Button *button) { break; case 4: - _screen->hideMouse(); _screen->drawBox(x, y, x2, y2, val2); - _screen->showMouse(); break; case 5: - _screen->hideMouse(); _screen->fillRect(x, y, x2, y2, val2, -1, true); - _screen->showMouse(); break; default: break; } - - _screen->updateScreen(); } int GUI_v2::processButtonList(Button *buttonList, uint16 inputFlag, int8 mouseWheel) { -- cgit v1.2.3