| 485 | } |
| 486 | |
| 487 | bool UInputController::destroy_device() |
| 488 | { |
| 489 | LogInfo << "Destroying uinput device"; |
| 490 | |
| 491 | if (fd_ < 0) { |
| 492 | return true; |
| 493 | } |
| 494 | |
| 495 | // Destroy the uinput device |
| 496 | if (ioctl(fd_, UI_DEV_DESTROY) < 0) { |
| 497 | LogWarn << "Failed to destroy uinput device" << VAR(errno) << VAR(std::strerror(errno)); |
| 498 | // Continue anyway |
| 499 | } |
| 500 | |
| 501 | ::close(fd_); |
| 502 | fd_ = -1; |
| 503 | |
| 504 | return true; |
| 505 | } |
| 506 | |
| 507 | bool UInputController::emit_abs(int code, int value) |
| 508 | { |
nothing calls this directly
no outgoing calls
no test coverage detected