aboutsummaryrefslogtreecommitdiff
path: root/gui/newgui.cpp
diff options
context:
space:
mode:
authorMax Horn2003-07-22 16:29:23 +0000
committerMax Horn2003-07-22 16:29:23 +0000
commitece1b83ac149d89a86cbd704024b9412251aa80a (patch)
treed17a2a136ec797c14adbdd199de039e289e88ceb /gui/newgui.cpp
parent8c8f22f65ad195b0bf376d1182a4f8355cb28759 (diff)
downloadscummvm-rg350-ece1b83ac149d89a86cbd704024b9412251aa80a.tar.gz
scummvm-rg350-ece1b83ac149d89a86cbd704024b9412251aa80a.tar.bz2
scummvm-rg350-ece1b83ac149d89a86cbd704024b9412251aa80a.zip
fixed key autorepeat when using button hot keys
svn-id: r9126
Diffstat (limited to 'gui/newgui.cpp')
-rw-r--r--gui/newgui.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/gui/newgui.cpp b/gui/newgui.cpp
index 90df0c978b..28b76f4561 100644
--- a/gui/newgui.cpp
+++ b/gui/newgui.cpp
@@ -151,10 +151,7 @@ void NewGui::runLoop() {
while (_system->poll_event(&event)) {
switch(event.event_code) {
case OSystem::EVENT_KEYDOWN:
- activeDialog->handleKeyDown(event.kbd.ascii, event.kbd.keycode, event.kbd.flags);
-
-#ifndef _WIN32_WCE
-#ifndef __PALM_OS__
+#if !defined(_WIN32_WCE) && !defined(__PALM_OS__)
// init continuous event stream
// not done on WinCE because keyboard is emulated and
// keyup is not generated
@@ -163,7 +160,7 @@ void NewGui::runLoop() {
_currentKeyDown.flags = event.kbd.flags;
_keyRepeatTime = time + kKeyRepeatInitialDelay;
#endif
-#endif
+ activeDialog->handleKeyDown(event.kbd.ascii, event.kbd.keycode, event.kbd.flags);
break;
case OSystem::EVENT_KEYUP:
activeDialog->handleKeyUp(event.kbd.ascii, event.kbd.keycode, event.kbd.flags);
@@ -235,11 +232,7 @@ void NewGui::saveState() {
_system->show_overlay();
// TODO - add getHeight & getWidth methods to OSystem.
-#ifndef __PALM_OS__
- _screen = new NewGuiColor[sys_width * sys_height];
-#else
_screen = (NewGuiColor*)calloc(sys_width*sys_height,sizeof(NewGuiColor));
-#endif
_screenPitch = sys_width;
_system->grab_overlay(_screen, _screenPitch);
@@ -256,11 +249,7 @@ void NewGui::restoreState() {
_system->hide_overlay();
if (_screen) {
-#ifndef __PALM_OS__
- delete [] _screen;
-#else
free(_screen);
-#endif
_screen = 0;
}