Gui: refactor buttons remapping (#1949)

* Gui: refactor buttons remapping
  Instead of calling 3 separate functions with a ton of switch/case statements,
  use a 2-dimensional lookup table to remap buttons based on the orientation.
* Gui: cleanup input mapping and fix incorrect asserts
* SnakeGame: handle input special case

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Vasyl "vk" Kaigorodov
2022-11-02 15:36:17 +01:00
committed by GitHub
parent 104a1998a5
commit abfa804ae0
6 changed files with 51 additions and 67 deletions

View File

@@ -380,6 +380,8 @@ int32_t snake_game_app(void* p) {
case InputKeyBack:
processing = false;
break;
default:
break;
}
}
} else if(event.type == EventTypeTick) {