Skip to content

Commit

Permalink
doom: Fix key_menu_forward in Crispness menu (#1112)
Browse files Browse the repository at this point in the history
key_menu_forward should behave like key_menu_right for enum items in the
Crispness menus.
  • Loading branch information
mikeday0 authored Nov 22, 2023
1 parent 45647d0 commit 2bb67ed
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/doom/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,9 @@ typedef struct
char name[10];

// choice = menu item #.
// if status = 2,
// if status = 2 or 3,
// choice=0:leftarrow,1:rightarrow
// [crispy] if status = 3,
// [crispy] if status = 4,
// choice=0:leftarrow,1:rightarrow,2:enter
void (*routine)(int choice);

Expand Down Expand Up @@ -2889,6 +2889,11 @@ boolean M_Responder (event_t* ev)
currentMenu->menuitems[itemOn].routine(1); // right arrow
S_StartSoundOptional(NULL, sfx_mnusli, sfx_stnmov); // [NS] Optional menu sounds.
}
else if (currentMenu->menuitems[itemOn].status == 3)

Check warning on line 2892 in src/doom/m_menu.c

View workflow job for this annotation

GitHub Actions / cpp-linter (clang)

/src/doom/m_menu.c:2892:13 [readability-misleading-indentation]

different indentation for 'if' and corresponding 'else'
{
currentMenu->menuitems[itemOn].routine(1); // right arrow
S_StartSoundOptional(NULL, sfx_mnuact, sfx_pistol); // [NS] Optional menu sounds.
}
else if (currentMenu->menuitems[itemOn].status == 4) // [crispy]
{
currentMenu->menuitems[itemOn].routine(2); // enter key
Expand Down

0 comments on commit 2bb67ed

Please sign in to comment.