Improved the handling of Producer's no dimensional mouse coords.

This commit is contained in:
Robert Osfield
2003-04-14 13:23:12 +00:00
parent 3df0401007
commit f543d69881
6 changed files with 39 additions and 39 deletions

View File

@@ -147,6 +147,7 @@ EventAdapter* KeyboardMouseCallback::createEventAdapter()
Producer::RenderSurface* rs = _keyboardMouse->getRenderSurface();
if (ia)
{
float minX = FLT_MAX;
float minY = FLT_MAX;
float maxX = -FLT_MAX;
@@ -172,9 +173,7 @@ EventAdapter* KeyboardMouseCallback::createEventAdapter()
}
else if (rs)
{
float xMin,yMin,xMax,yMax;
rs->getWindowRect(xMin,xMax,yMin,yMax);
ea->setWindowSize(xMin,yMin,xMax,yMax);
ea->setWindowSize(-1.0f,-1.0f,1.0f,1.0f);
}
return ea;