Input: refactoring, platform agnostic key configuration.
Update input usage across project. Minor queue usage fixes and tick timings. (#330)
This commit is contained in:
@@ -65,12 +65,12 @@ void AppExample::run() {
|
||||
if(get_event(&event, 1000)) {
|
||||
if(event.type == AppExampleEvent::EventTypeKey) {
|
||||
// press events
|
||||
if(event.value.input.state && event.value.input.input == InputBack) {
|
||||
if(event.value.input.type == InputTypeShort && event.value.input.key == InputKeyBack) {
|
||||
printf("bye!\n");
|
||||
exit();
|
||||
}
|
||||
|
||||
if(event.value.input.state && event.value.input.input == InputUp) {
|
||||
if(event.value.input.type == InputTypeShort && event.value.input.key == InputKeyUp) {
|
||||
// to read or write state you need to execute
|
||||
// acquire modify release state
|
||||
acquire_state();
|
||||
|
Reference in New Issue
Block a user