]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/linux/gamecontroller.cpp
Close the game controller device when deleting the object
[libs/gui.git] / source / input / linux / gamecontroller.cpp
index d5fed3baba92783c7e7e347bf0fd2fced4723100..7fc59ed6669d0f99f11758f352ac1a478550b570 100644 (file)
@@ -57,6 +57,11 @@ JsDevice::JsDevice(const string &fn)
                throw system_error(format("open(%s)", fn));
 }
 
+JsDevice::~JsDevice()
+{
+       sys_close(handle);
+}
+
 string JsDevice::get_name() const
 {
        char buf[128] = { 0 };