_print = fgGetNode("/sim/rendering/print-statistics", true);
}
+void FGEventHandler::reset()
+{
+ _display = fgGetNode("/sim/rendering/on-screen-statistics", true);
+ _print = fgGetNode("/sim/rendering/print-statistics", true);
+ statsHandler->reset();
+}
+
namespace
{
// Translate OSG modifier mask to FG modifier mask.
button = 4;
else
button = -1;
+
+#if defined(SG_MAC)
+ // bug https://code.google.com/p/flightgear-bugs/issues/detail?id=1286
+ // Mac (Cocoa) interprets shuft+wheel as horizontal scroll
+ if (ea.getModKeyMask() & osgGA::GUIEventAdapter::MODKEY_SHIFT) {
+ if (ea.getScrollingDeltaX() > 0)
+ button = 3;
+ else if (ea.getScrollingDeltaX() < 0)
+ button = 4;
+ }
+#endif
+
} else if (ea.getScrollingMotion() == osgGA::GUIEventAdapter::SCROLL_UP)
button = 3;
else