Device migrations, driver migrations and more (#575)
This commit is contained in:
committed by
GitHub
parent
2d768ef3a1
commit
2fbc44466a
@@ -47,7 +47,18 @@ void software_keyboard_deactivate() {
|
||||
}
|
||||
|
||||
bool hardware_keyboard_is_available() {
|
||||
return keyboard_device != nullptr || device_find_first_by_type(&KEYBOARD_TYPE) != nullptr;
|
||||
if (keyboard_device != nullptr) {
|
||||
return true;
|
||||
}
|
||||
bool has_kernel_keyboard = false;
|
||||
device_for_each_of_type(&KEYBOARD_TYPE, &has_kernel_keyboard, [](Device* device, void* context) {
|
||||
if (device_is_ready(device)) {
|
||||
*static_cast<bool*>(context) = true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return has_kernel_keyboard;
|
||||
}
|
||||
|
||||
void hardware_keyboard_set_indev(lv_indev_t* device) {
|
||||
|
||||
Reference in New Issue
Block a user