MCPcopy Create free account
hub / github.com/MaaXYZ/MaaFramework / destroy_device

Method destroy_device

source/MaaKWinControlUnit/Input/UInputController.cpp:487–505  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

485}
486
487bool 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
507bool UInputController::emit_abs(int code, int value)
508{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected