- PyObject *pArgs = PyTuple_New(2);
- PyTuple_SetItem(pArgs, 0, PyString_FromString(k->first.c_str()));
- PyTuple_SetItem(pArgs, 1, PyString_FromString(k->second.m_action.c_str()));
- ++k;
- ePython::call(i->second.m_fnc, pArgs);
- Py_DECREF(pArgs);
- } else
- ++k;
+ if (
+ // (k->second.m_device == m_device) &&
+ (k->second.m_key == key) &&
+ (k->second.m_flags & (1<<flags)))
+ {
+ PyObject *pArgs = PyTuple_New(2);
+ PyTuple_SET_ITEM(pArgs, 0, PyString_FromString(k->first.c_str()));
+ PyTuple_SET_ITEM(pArgs, 1, PyString_FromString(k->second.m_action.c_str()));
+ ++k;
+ Py_INCREF(i->second.m_fnc);
+ call_list.push_back(call_entry(i->second.m_fnc, pArgs));
+ } else
+ ++k;
+ }
+ } else
+ {
+ PyObject *pArgs = PyTuple_New(2);
+ PyTuple_SET_ITEM(pArgs, 0, PyInt_FromLong(key));
+ PyTuple_SET_ITEM(pArgs, 1, PyInt_FromLong(flags));
+ Py_INCREF(i->second.m_fnc);
+ call_list.push_back(call_entry(i->second.m_fnc, pArgs));