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()
|
void controller_key::set(keyboard_key* _key, unsigned _subkey) throw()
|
||||||
{
|
{
|
||||||
umutex_class u(mutex);
|
umutex_class u(mutex);
|
||||||
if(_key)
|
if(key != _key) {
|
||||||
_key->add_listener(*this, false);
|
if(_key) _key->add_listener(*this, false);
|
||||||
if(key)
|
if(key) key->remove_listener(*this);
|
||||||
key->remove_listener(*this);
|
}
|
||||||
key = _key;
|
key = _key;
|
||||||
subkey = _subkey;
|
subkey = _subkey;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue