Linux fixes
This commit is contained in:
parent
fed8ce623b
commit
216d2328a3
2 changed files with 5 additions and 3 deletions
|
@ -102,8 +102,8 @@ FGInputEvent::FGInputEvent( FGInputDevice * aDevice, SGPropertyNode_ptr node ) :
|
||||||
|
|
||||||
read_bindings( node, bindings, KEYMOD_NONE, device->GetNasalModule() );
|
read_bindings( node, bindings, KEYMOD_NONE, device->GetNasalModule() );
|
||||||
|
|
||||||
for (auto node : node->getChildren("setting"))
|
for (auto child : node->getChildren("setting"))
|
||||||
settings.push_back( new FGEventSetting(node) );
|
settings.push_back( new FGEventSetting(child) );
|
||||||
}
|
}
|
||||||
|
|
||||||
FGInputEvent::~FGInputEvent()
|
FGInputEvent::~FGInputEvent()
|
||||||
|
|
|
@ -483,8 +483,10 @@ void FGLinuxEventInput::postinit()
|
||||||
const char * name = udev_device_get_sysattr_value(dev,"name");
|
const char * name = udev_device_get_sysattr_value(dev,"name");
|
||||||
const char * serial = udev_device_get_sysattr_value(dev, "serial");
|
const char * serial = udev_device_get_sysattr_value(dev, "serial");
|
||||||
SG_LOG(SG_INPUT,SG_DEBUG, "name=" << (name?name:"<null>") << ", node=" << (node?node:"<null>"));
|
SG_LOG(SG_INPUT,SG_DEBUG, "name=" << (name?name:"<null>") << ", node=" << (node?node:"<null>"));
|
||||||
if( name && node )
|
if( name && node ) {
|
||||||
|
std::string serialString = serial ? serial : std::stringP{};
|
||||||
AddDevice( new FGLinuxInputDevice(name, node, serial) );
|
AddDevice( new FGLinuxInputDevice(name, node, serial) );
|
||||||
|
}
|
||||||
|
|
||||||
udev_device_unref(dev);
|
udev_device_unref(dev);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue