From 5950a2346eabaa6759b77cf2d2ea099e43a26a7e Mon Sep 17 00:00:00 2001 From: Chris Apers Date: Mon, 20 Dec 2004 16:48:49 +0000 Subject: - Change mouse position on click - Remove timimg code which slow down PalmOS port svn-id: r16163 --- sky/control.cpp | 7 ++++++- sky/sky.cpp | 11 +++++++++++ 2 files changed, 17 insertions(+), 1 deletion(-) (limited to 'sky') diff --git a/sky/control.cpp b/sky/control.cpp index ae7d959f2b..2b4b5307e4 100644 --- a/sky/control.cpp +++ b/sky/control.cpp @@ -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); } diff --git a/sky/sky.cpp b/sky/sky.cpp index e87b0634d1..9a2fdc6ce1 100644 --- a/sky/sky.cpp +++ b/sky/sky.cpp @@ -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); } -- cgit v1.2.3