[Scummvm-cvs-logs] SF.net SVN: scummvm:[34159] scummvm/branches/branch-0-12-0/engines/kyra
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Aug 25 17:20:11 CEST 2008
Revision: 34159
http://scummvm.svn.sourceforge.net/scummvm/?rev=34159&view=rev
Author: lordhoto
Date: 2008-08-25 15:20:09 +0000 (Mon, 25 Aug 2008)
Log Message:
-----------
Oops one should apply the patch before committing ;-). (real checkin for r34158)
Modified Paths:
--------------
scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.cpp
scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.h
Modified: scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.cpp
===================================================================
--- scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.cpp 2008-08-25 15:16:55 UTC (rev 34158)
+++ scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.cpp 2008-08-25 15:20:09 UTC (rev 34159)
@@ -35,6 +35,7 @@
GUI_v2::GUI_v2(KyraEngine_v2 *vm) : GUI(vm), _vm(vm), _screen(vm->screen_v2()) {
_backUpButtonList = _unknownButtonList = 0;
_buttonListChanged = false;
+ _lastScreenUpdate = 0;
_currentMenu = 0;
_isDeathMenu = false;
@@ -762,6 +763,7 @@
x2 -= getCharWidth(buffer[curPos]);
drawTextfieldBlock(x2, y2, c3);
_screen->updateScreen();
+ _lastScreenUpdate = _vm->_system->getMillis();
} else if (_keyPressed.ascii > 31 && _keyPressed.ascii < 127 && curPos < bufferSize) {
if (x2 + getCharWidth(_keyPressed.ascii) + 7 < 0x11F) {
buffer[curPos] = _keyPressed.ascii;
@@ -771,11 +773,11 @@
drawTextfieldBlock(x2, y2, c3);
++curPos;
_screen->updateScreen();
+ _lastScreenUpdate = _vm->_system->getMillis();
}
}
_keyPressed.reset();
- _vm->delay(10);
}
return buffer;
@@ -819,6 +821,8 @@
void GUI_v2::checkTextfieldInput() {
Common::Event event;
+ uint32 now = _vm->_system->getMillis();
+
bool running = true;
int keys = 0;
while (_vm->_eventMan->pollEvent(event) && running) {
@@ -849,6 +853,7 @@
_vm->_mouseX = pos.x;
_vm->_mouseY = pos.y;
_screen->updateScreen();
+ _lastScreenUpdate = now;
} break;
default:
@@ -856,7 +861,13 @@
}
}
+ if (now - _lastScreenUpdate > 50) {
+ _vm->_system->updateScreen();
+ _lastScreenUpdate = now;
+ }
+
processButtonList(_menuButtonList, keys | 0x8000, 0);
+ _vm->_system->delayMillis(3);
}
void GUI_v2::drawTextfieldBlock(int x, int y, uint8 c) {
Modified: scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.h
===================================================================
--- scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.h 2008-08-25 15:16:55 UTC (rev 34158)
+++ scummvm/branches/branch-0-12-0/engines/kyra/gui_v2.h 2008-08-25 15:20:09 UTC (rev 34159)
@@ -213,6 +213,7 @@
// savename menu
bool _finishNameInput, _cancelNameInput;
Common::KeyState _keyPressed;
+ uint32 _lastScreenUpdate;
const char *nameInputProcess(char *buffer, int x, int y, uint8 c1, uint8 c2, uint8 c3, int bufferSize);
int finishSavename(Button *caller);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list