mirror of https://github.com/stella-emu/stella.git
Fix bug with unwanted mouse movement after changing video modes.
git-svn-id: svn://svn.code.sf.net/p/stella/code/trunk@2239 8b62c5a3-ac7e-4cc8-8f21-d9a121418aba
This commit is contained in:
parent
975d221606
commit
87e3a71580
|
@ -646,8 +646,12 @@ void EventHandler::poll(uInt64 time)
|
|||
if(myMouseEnabled)
|
||||
{
|
||||
int x = event.motion.xrel, y = event.motion.yrel;
|
||||
myEvent->set(Event::MouseAxisXValue, x);
|
||||
myEvent->set(Event::MouseAxisYValue, y);
|
||||
// Filter out extremely large movement, which is usually caused
|
||||
// by a screen being re-created
|
||||
if(abs(x) < 100)
|
||||
myEvent->set(Event::MouseAxisXValue, x);
|
||||
if(abs(y) < 100)
|
||||
myEvent->set(Event::MouseAxisYValue, y);
|
||||
}
|
||||
}
|
||||
else if(myOverlay)
|
||||
|
|
Loading…
Reference in New Issue