Skip to content

Commit

Permalink
fix control
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobaraujo7 committed Jan 16, 2024
1 parent 354aef5 commit d43b3e4
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/app/(public)/home_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,9 @@ class _HomePageState extends State<HomePage> {

switch (event) {
case GamepadButton.dpadDown || GamepadButton.leftStickDown:
handlerSelect((selectedItemIndex + crossAxisCount) % games.length);
handlerSelect((selectedItemIndex + crossAxisCount) < games.length
? selectedItemIndex + crossAxisCount
: selectedItemIndex);
case GamepadButton.dpadUp || GamepadButton.leftStickUp:
handlerSelect((selectedItemIndex - crossAxisCount) >= 0
? selectedItemIndex - crossAxisCount
Expand Down

0 comments on commit d43b3e4

Please sign in to comment.