- // OK, PUI didn't want the event,
- // so we can play with it.
- if (x != m.x) {
- int delta = x - m.x;
- d->xAccelNode->setIntValue( delta );
- for (unsigned int i = 0; i < mode.x_bindings[modifiers].size(); i++)
- mode.x_bindings[modifiers][i]->fire(double(delta), double(xsize));
- }
- if (y != m.y) {
- int delta = y - m.y;
- d->yAccelNode->setIntValue( -delta );
- for (unsigned int i = 0; i < mode.y_bindings[modifiers].size(); i++)
- mode.y_bindings[modifiers][i]->fire(double(delta), double(ysize));
- }
+ int modifiers = fgGetKeyModifiers();
+ int xsize = d->xSizeNode ? d->xSizeNode->getIntValue() : 800;
+ int ysize = d->ySizeNode ? d->ySizeNode->getIntValue() : 600;
+
+ // OK, PUI didn't want the event,
+ // so we can play with it.
+ if (x != m.x) {
+ int delta = x - m.x;
+ d->xAccelNode->setIntValue( delta );
+ for (unsigned int i = 0; i < mode.x_bindings[modifiers].size(); i++)
+ mode.x_bindings[modifiers][i]->fire(double(delta), double(xsize));
+ }
+ if (y != m.y) {
+ int delta = y - m.y;
+ d->yAccelNode->setIntValue( -delta );
+ for (unsigned int i = 0; i < mode.y_bindings[modifiers].size(); i++)
+ mode.y_bindings[modifiers][i]->fire(double(delta), double(ysize));
+ }