Skip to content

Commit

Permalink
Merge pull request #2387 from LettucePie/gamepad-shortcut
Browse files Browse the repository at this point in the history
Gamepad shortcut to Surf
  • Loading branch information
nesbox authored Dec 9, 2023
2 parents 039255a + e3401db commit 271291d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/studio/screens/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -4112,12 +4112,26 @@ static void processKeyboard(Console* console)

}

static void processGamepad(Console* console)
{
tic_mem* tic = console->tic;

if(!console->active)
return;

if(tic->ram->input.keyboard.data == 0 && tic_api_btnp(tic, 6, -1, -1))
{
gotoSurf(console->studio);
}
}

static void tick(Console* console)
{
tic_mem* tic = console->tic;

processMouse(console);
processKeyboard(console);
processGamepad(console);

Start* start = getStartScreen(console->studio);

Expand Down

0 comments on commit 271291d

Please sign in to comment.