jscene: honor the getkey feature function in jscene_run()

This commit is contained in:
Lephenixnoir 2022-11-19 18:58:19 +01:00
parent 2e15bb8c96
commit 67219834be
No known key found for this signature in database
GPG key ID: 1BBA026E13FC0495

View file

@ -231,12 +231,18 @@ jevent jscene_run(jscene *s)
continue;
}
#endif
getkey_feature_t feat = getkey_feature_function();
if((k.type == KEYEV_DOWN || k.type == KEYEV_HOLD) && feat && feat(k))
continue;
if(k.type != KEYEV_NONE && !jscene_process_key_event(s, k)) {
e.type = JWIDGET_KEY;
e.key = k;
break;
}
// TODO: Should only sleep when out of events!
sleep();
}