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
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 6 additions and 0 deletions

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();
}