Move hotkey event logging to a more useful place

So that key down/up events are logged, too.
This commit is contained in:
Jyrki Vesterinen 2018-02-24 13:46:39 +02:00
parent 1742166de0
commit fbeba25315

View file

@ -527,13 +527,14 @@ void key_event(const SDL_Event& event, command_executor* executor)
static void event_execute( const SDL_Event& event, command_executor* executor)
{
if (!executor) return;
LOG_HK << "event 0x" << std::hex << event.type << std::dec << std::endl;
const hotkey_ptr hk = get_hotkey(event);
if (!hk->active() || hk->is_disabled()) {
return;
}
LOG_HK << "event 0x" << std::hex << event.type << std::dec << std::endl;
bool press = event.type == SDL_KEYDOWN ||
event.type == SDL_JOYBUTTONDOWN ||
event.type == SDL_MOUSEBUTTONDOWN ||