- Change mouse position on click

- Remove timimg code which slow down PalmOS port

svn-id: r16163
This commit is contained in:
Chris Apers 2004-12-20 16:48:49 +00:00
parent 67f803224c
commit 5950a2346e
2 changed files with 17 additions and 1 deletions

View File

@ -1505,6 +1505,10 @@ void Control::delay(unsigned int amount) {
_mouseY = event.mouse.y;
break;
case OSystem::EVENT_LBUTTONDOWN:
#ifdef __PALM_OS__
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;
#endif
_mouseClicked = true;
break;
case OSystem::EVENT_LBUTTONUP:
@ -1521,6 +1525,7 @@ void Control::delay(unsigned int amount) {
}
}
#ifndef __PALM_OS__
uint this_delay = 20; // 1?
#ifdef _WIN32_WCE
this_delay = 10;
@ -1529,7 +1534,7 @@ void Control::delay(unsigned int amount) {
this_delay = amount;
if (this_delay > 0) _system->delayMillis(this_delay);
#endif
cur = _system->getMillis();
} while (cur < start + amount);
}

View File

@ -423,9 +423,17 @@ void SkyEngine::delay(int32 amount) {
}
break;
case OSystem::EVENT_LBUTTONDOWN:
#ifdef __PALM_OS__
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;
#endif
_skyMouse->buttonPressed(2);
break;
case OSystem::EVENT_RBUTTONDOWN:
#ifdef __PALM_OS__
_mouseX = event.mouse.x;
_mouseY = event.mouse.y;
#endif
_skyMouse->buttonPressed(1);
break;
case OSystem::EVENT_QUIT:
@ -436,8 +444,11 @@ void SkyEngine::delay(int32 amount) {
break;
}
}
#ifndef __PALM_OS__
if (amount > 0)
_system->delayMillis((amount > 10) ? 10 : amount);
#endif
} while (_system->getMillis() < start + amount);
}