Fix bug when changing controller key to another subkey of the same key
This commit is contained in:
parent
e9a3787344
commit
6e013653cb
1 changed files with 4 additions and 4 deletions
|
@ -451,10 +451,10 @@ std::string controller_key::get_string() throw(std::bad_alloc)
|
|||
void controller_key::set(keyboard_key* _key, unsigned _subkey) throw()
|
||||
{
|
||||
umutex_class u(mutex);
|
||||
if(_key)
|
||||
_key->add_listener(*this, false);
|
||||
if(key)
|
||||
key->remove_listener(*this);
|
||||
if(key != _key) {
|
||||
if(_key) _key->add_listener(*this, false);
|
||||
if(key) key->remove_listener(*this);
|
||||
}
|
||||
key = _key;
|
||||
subkey = _subkey;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue