Merge /u/accek/flightgear/ branch fixlets-1 into next
https://sourceforge.net/p/flightgear/flightgear/merge-requests/74/
This commit is contained in:
commit
5c0550b495
6 changed files with 14 additions and 15 deletions
|
@ -183,7 +183,7 @@ private:
|
||||||
class SymbolRule
|
class SymbolRule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SymbolRule()
|
SymbolRule() : enabled(false)
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -229,12 +229,11 @@ void FGMacOSXEventInput::shutdown()
|
||||||
{
|
{
|
||||||
FGEventInput::shutdown();
|
FGEventInput::shutdown();
|
||||||
|
|
||||||
IOHIDManagerRegisterDeviceMatchingCallback(d->hidManager, nullptr, nullptr);
|
if (d->hidManager) {
|
||||||
IOHIDManagerRegisterDeviceRemovalCallback(d->hidManager, nullptr, nullptr);
|
IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone);
|
||||||
|
IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
||||||
IOHIDManagerClose(d->hidManager, kIOHIDOptionsTypeNone);
|
CFRelease(d->hidManager);
|
||||||
IOHIDManagerUnscheduleFromRunLoop(d->hidManager, CFRunLoopGetCurrent(), kCFRunLoopDefaultMode);
|
}
|
||||||
CFRelease(d->hidManager);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
|
|
|
@ -1706,7 +1706,7 @@ FGPositionedRef NavDataCache::loadById(PositionedID rowid)
|
||||||
}
|
}
|
||||||
|
|
||||||
sqlite3_int64 aptId;
|
sqlite3_int64 aptId;
|
||||||
FGPositioned* pos = d->loadById(rowid, aptId);
|
FGPositionedRef pos = d->loadById(rowid, aptId);
|
||||||
d->cache.insert(it, PositionedCache::value_type(rowid, pos));
|
d->cache.insert(it, PositionedCache::value_type(rowid, pos));
|
||||||
d->cacheMisses++;
|
d->cacheMisses++;
|
||||||
|
|
||||||
|
@ -1933,7 +1933,7 @@ FGPositionedRef NavDataCache::findClosestWithIdent( const string& aIdent,
|
||||||
FGPositionedRef result;
|
FGPositionedRef result;
|
||||||
|
|
||||||
while (d->stepSelect(d->findClosestWithIdent)) {
|
while (d->stepSelect(d->findClosestWithIdent)) {
|
||||||
FGPositioned* pos = loadById(sqlite3_column_int64(d->findClosestWithIdent, 0));
|
FGPositionedRef pos = loadById(sqlite3_column_int64(d->findClosestWithIdent, 0));
|
||||||
if (aFilter && !aFilter->pass(pos)) {
|
if (aFilter && !aFilter->pass(pos)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -2073,7 +2073,7 @@ NavDataCache::findCommByFreq(int freqKhz, const SGGeod& aPos, FGPositioned::Filt
|
||||||
FGPositionedRef result;
|
FGPositionedRef result;
|
||||||
|
|
||||||
while (d->execSelect(d->findCommByFreq)) {
|
while (d->execSelect(d->findCommByFreq)) {
|
||||||
FGPositioned* p = loadById(sqlite3_column_int64(d->findCommByFreq, 0));
|
FGPositionedRef p = loadById(sqlite3_column_int64(d->findCommByFreq, 0));
|
||||||
if (aFilter && !aFilter->pass(p)) {
|
if (aFilter && !aFilter->pass(p)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -85,7 +85,7 @@ FGPositioned::~FGPositioned()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
FGPositioned*
|
FGPositionedRef
|
||||||
FGPositioned::createUserWaypoint(const std::string& aIdent, const SGGeod& aPos)
|
FGPositioned::createUserWaypoint(const std::string& aIdent, const SGGeod& aPos)
|
||||||
{
|
{
|
||||||
NavDataCache* cache = NavDataCache::instance();
|
NavDataCache* cache = NavDataCache::instance();
|
||||||
|
@ -93,7 +93,7 @@ FGPositioned::createUserWaypoint(const std::string& aIdent, const SGGeod& aPos)
|
||||||
FGPositionedList existing = cache->findAllWithIdent(aIdent, &filter, true);
|
FGPositionedList existing = cache->findAllWithIdent(aIdent, &filter, true);
|
||||||
if (!existing.empty()) {
|
if (!existing.empty()) {
|
||||||
SG_LOG(SG_NAVAID, SG_WARN, "attempt to insert duplicate WAYPOINT:" << aIdent);
|
SG_LOG(SG_NAVAID, SG_WARN, "attempt to insert duplicate WAYPOINT:" << aIdent);
|
||||||
return existing.front().ptr();
|
return existing.front();
|
||||||
}
|
}
|
||||||
|
|
||||||
PositionedID id = cache->createPOI(WAYPOINT, aIdent, aPos);
|
PositionedID id = cache->createPOI(WAYPOINT, aIdent, aPos);
|
||||||
|
|
|
@ -269,7 +269,7 @@ public:
|
||||||
*/
|
*/
|
||||||
static const char* nameForType(Type aTy);
|
static const char* nameForType(Type aTy);
|
||||||
|
|
||||||
static FGPositioned* createUserWaypoint(const std::string& aIdent, const SGGeod& aPos);
|
static FGPositionedRef createUserWaypoint(const std::string& aIdent, const SGGeod& aPos);
|
||||||
static bool deleteUserWaypoint(const std::string& aIdent);
|
static bool deleteUserWaypoint(const std::string& aIdent);
|
||||||
protected:
|
protected:
|
||||||
friend class flightgear::NavDataCache;
|
friend class flightgear::NavDataCache;
|
||||||
|
|
|
@ -428,8 +428,8 @@ void FGNetCtrls2Props( FGNetCtrls *net, bool honor_freezes,
|
||||||
// node->setDoubleValue( net->brake_right );
|
// node->setDoubleValue( net->brake_right );
|
||||||
|
|
||||||
node = fgGetNode( "/controls/switches", true );
|
node = fgGetNode( "/controls/switches", true );
|
||||||
node->setBoolValue( "master-bat", net->master_bat != 0 );
|
node->setBoolValue( "master-bat", net->master_bat[0] != 0 );
|
||||||
node->setBoolValue( "master-alt", net->master_alt != 0 );
|
node->setBoolValue( "master-alt", net->master_alt[0] != 0 );
|
||||||
node->setBoolValue( "master-avionics", net->master_avionics > 0 );
|
node->setBoolValue( "master-avionics", net->master_avionics > 0 );
|
||||||
|
|
||||||
node = fgGetNode( "/environment", true );
|
node = fgGetNode( "/environment", true );
|
||||||
|
|
Loading…
Reference in a new issue