Compare commits

..

3 Commits

Author SHA1 Message Date
Automatic Release Builder
17f86567f1 new version: 2020.1.3 2020-06-25 15:40:15 +01:00
James Turner
059bad1840 Fix zero-interval repeat on pick/knob animation
See:
https://sourceforge.net/p/flightgear/codetickets/2241/

Note did not adjust bug in knob-animation ignoring repeatable flag
(always marked repeatable) since this might break some aircraft.
2020-06-20 16:11:08 +01:00
James Turner
b7d4acc67d Fix compilation with Boost >= 1.73 2020-06-20 16:10:56 +01:00
3 changed files with 25 additions and 11 deletions

View File

@@ -227,7 +227,7 @@ if(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD
endif()
find_package(Boost REQUIRED)
set (BOOST_CXX_FLAGS "-DBOOST_BIMAP_DISABLE_SERIALIZATION")
set (BOOST_CXX_FLAGS "-DBOOST_BIMAP_DISABLE_SERIALIZATION -DBOOST_NO_STDLIB_CONFIG")
include(BoostTestTargets)
if(SIMGEAR_HEADLESS)

View File

@@ -136,11 +136,19 @@ osg::Vec2d eventToWindowCoords(const osgGA::GUIEventAdapter& ea)
virtual void update(double dt, int keyModState)
{
if (!_condition || _condition->test()) {
SG_UNUSED(keyModState);
if (!_repeatable)
return;
SG_UNUSED(keyModState);
if (_condition && !_condition->test()) {
return;
}
if (!_repeatable)
return;
const bool zeroInterval = (_repeatInterval <= 0.0);
if (zeroInterval) {
// fire once per frame
fireBindingList(_bindingsDown);
} else {
_repeatTime += dt;
while (_repeatInterval < _repeatTime) {
_repeatTime -= _repeatInterval;
@@ -678,12 +686,18 @@ public:
if (_hasDragged) {
return;
}
_repeatTime += dt;
while (_repeatInterval < _repeatTime) {
_repeatTime -= _repeatInterval;
const bool zeroInterval = (_repeatInterval <= 0.0);
if (zeroInterval) {
// fire once per frame
fire(keyModState & osgGA::GUIEventAdapter::MODKEY_SHIFT, _direction);
} // of repeat iteration
} else {
_repeatTime += dt;
while (_repeatInterval < _repeatTime) {
_repeatTime -= _repeatInterval;
fire(keyModState & osgGA::GUIEventAdapter::MODKEY_SHIFT, _direction);
} // of repeat iteration
}
}
bool hover( const osg::Vec2d& windowPos, const Info& ) override

View File

@@ -1 +1 @@
2020.1.2
2020.1.3