review fixes
This commit is contained in:
@@ -342,12 +342,12 @@ PIVector<PIHIDeviceInfo> PIHIDevice::allDevices(bool try_open) {
|
||||
|
||||
PIDir hid_dir("/sys/bus/hid/devices"_a);
|
||||
auto hid_devs = hid_dir.entries();
|
||||
for (auto hd: hid_devs) {
|
||||
for (const auto & hd: hid_devs) {
|
||||
// piCout << d.path;
|
||||
if (!isDir(hd)) continue;
|
||||
PIDir dir_input(hd.path + "/input"_a);
|
||||
auto hid_inputs = dir_input.entries();
|
||||
for (auto hd_i: hid_inputs) {
|
||||
for (const auto & hd_i: hid_inputs) {
|
||||
if (!isDir(hd_i)) continue;
|
||||
// now in /sys/bus/hid/devices/<dev>/input/input<N>
|
||||
// piCout << hd_i.path;
|
||||
@@ -364,7 +364,7 @@ PIVector<PIHIDeviceInfo> PIHIDevice::allDevices(bool try_open) {
|
||||
PIDir dir_e(hd_i.path);
|
||||
PIStringList devs;
|
||||
auto dl_e = dir_e.entries();
|
||||
for (auto d_e: dl_e) {
|
||||
for (const auto & d_e: dl_e) {
|
||||
if (!d_e.isDir() || d_e.flags[PIFile::FileInfo::Dot] || d_e.flags[PIFile::FileInfo::DotDot]) continue;
|
||||
devs << d_e.name();
|
||||
}
|
||||
@@ -392,7 +392,7 @@ PIVector<PIHIDeviceInfo> PIHIDevice::allDevices(bool try_open) {
|
||||
if (test_f.isClosed()) continue;
|
||||
}
|
||||
|
||||
ullong ev = readFile(hd_i.path + "/capabilities/ev"_a).toULLong(16);
|
||||
// ullong ev = readFile(hd_i.path + "/capabilities/ev"_a).toULLong(16);
|
||||
|
||||
auto readAxes = [readFile, checkBit, &hd_i, &dev](const PIString & file, bool is_relative) {
|
||||
PIVector<PIHIDeviceInfo::AxisInfo> ret;
|
||||
|
||||
Reference in New Issue
Block a user