]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/binarycontrol.cpp
Fill in more fields of DEVMODE to avoid a crash
[libs/gui.git] / source / input / binarycontrol.cpp
index 70a816570fb2d33bcc697ec52fe1fe770cd19147..b0148ccf5332f023d22c1a9dfe436ba94fe93783 100644 (file)
@@ -21,16 +21,19 @@ BinaryControl::BinaryControl(Device &d, ControlSrcType t, unsigned i):
        threshold(0.5)
 { }
 
+BinaryControl::~BinaryControl()
+{ }
+
 void BinaryControl::set_threshold(float t)
 {
-       threshold=t;
+       threshold = t;
 }
 
 void BinaryControl::on_press()
 {
        if(!state)
        {
-               state=true;
+               state = true;
                signal_press.emit();
        }
 }
@@ -39,7 +42,7 @@ void BinaryControl::on_release()
 {
        if(state)
        {
-               state=false;
+               state = false;
                signal_release.emit();
        }
 }