1 #include "core/command.hpp"
2 #include "core/keymapper.hpp"
3 #include "library/command.hpp"
4 #include "library/globalwrap.hpp"
5 #include "library/keyboard-mapper.hpp"
6 #include "library/threads.hpp"
11 command::set lsnes_cmds
;
13 alias_binds_manager::alias_binds_manager(keyboard::mapper
& _mapper
, command::group
& _command
)
14 : mapper(_mapper
), command(_command
)
18 alias_binds_manager::~alias_binds_manager()
20 for(auto i
: alias_binds
) delete i
.second
;
24 void alias_binds_manager::operator()()
26 threads::alock
h(mut
);
27 auto a
= command
.get_aliases();
28 for(auto i
: alias_binds
) {
29 if(!a
.count(i
.first
)) {
31 alias_binds
[i
.first
] = NULL
;
35 if(i
== "" || i
[0] == '-')
37 if(!alias_binds
.count(i
) || alias_binds
[i
] == NULL
)
38 alias_binds
[i
] = new keyboard::invbind(mapper
, i
, "Aliasā£" + i
);