]> git.tdb.fi Git - libs/gui.git/blobdiff - source/input/control.cpp
Rename ControlSrcType::NONE to NO_SOURCE
[libs/gui.git] / source / input / control.cpp
index fb1d37654b61b812c05bc1092f98158e7df50a16..17436a8ecbe761c45c025030ecb3dad6afbb21f2 100644 (file)
@@ -23,7 +23,7 @@ std::string ControlSource::str() const
                return dev->get_axis_name(index)+" +";
        else if(type==AXIS_NEG)
                return dev->get_axis_name(index)+" -";
-       else if(type==NONE)
+       else if(type==NO_SOURCE)
                return "None";
 
        return lexical_cast<string>(index);
@@ -87,7 +87,7 @@ void Control::connect_signals()
 {
        switch(src.type)
        {
-       case NONE:
+       case NO_SOURCE:
                break;
        case BUTTON:
                src.dev->signal_button_press.connect(sigc::bind_return(sigc::mem_fun(this, &Control::button_press), false));
@@ -130,13 +130,13 @@ void Control::axis_motion(unsigned i, float v, float r)
 {
        if(capture_dev)
        {
-               ControlSrcType type = NONE;
+               ControlSrcType type = NO_SOURCE;
                if(v<-0.9)
                        type = AXIS_NEG;
                else if(v>0.9)
                        type = AXIS_POS;
 
-               if(type!=NONE)
+               if(type!=NO_SOURCE)
                {
                        src.dev = capture_dev;
                        src.type = type;