Cleanup in InputDevice
This commit is contained in:
parent
1c209edaad
commit
c261b6582c
|
@ -54,8 +54,10 @@ InputDevice::InputDevice(const char* name)
|
||||||
int err = libevdev_uinput_create_from_device(device,
|
int err = libevdev_uinput_create_from_device(device,
|
||||||
LIBEVDEV_UINPUT_OPEN_MANAGED, &ui_device);
|
LIBEVDEV_UINPUT_OPEN_MANAGED, &ui_device);
|
||||||
|
|
||||||
if(err != 0)
|
if(err != 0) {
|
||||||
|
libevdev_free(device);
|
||||||
throw std::system_error(-err, std::generic_category());
|
throw std::system_error(-err, std::generic_category());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
InputDevice::~InputDevice()
|
InputDevice::~InputDevice()
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#define LOGID_INPUTDEVICE_H
|
#define LOGID_INPUTDEVICE_H
|
||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
extern "C"
|
extern "C"
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user