Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Limit keys that can call the menu from the titlepic #545

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
110 changes: 56 additions & 54 deletions prboom2/src/m_menu.c
Original file line number Diff line number Diff line change
Expand Up @@ -5086,32 +5086,6 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

// Pop-up Main menu?
if ((!in_game && ch > -1) || ch == KEYD_ESCAPE || action == MENU_ESCAPE) // phares
{
M_StartControlPanel();
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_console))
{
if (dsda_OpenConsole())
S_StartVoidSound(g_sfx_swtchn);
return true;
}

{
int i;

for (i = 0; i < CONSOLE_SCRIPT_COUNT; ++i)
if (dsda_InputActivated(dsda_input_script_0 + i)) {
dsda_ExecuteConsoleScript(i);

return true;
}
}

// Toggle gamma
if (dsda_InputActivated(dsda_input_gamma))
{
Expand All @@ -5125,22 +5099,20 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

if (dsda_InputActivated(dsda_input_zoomout))
if (dsda_InputActivated(dsda_input_cycle_profile))
{
if (automap_active)
return false;
M_SizeDisplay(0);
S_StartVoidSound(g_sfx_stnmov);
int value = dsda_CycleConfig(dsda_config_input_profile, true);
doom_printf("Input Profile %d", value);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_zoomin))
{ // jff 2/23/98
if (automap_active) // allow
return false; // key_hud==key_zoomin
M_SizeDisplay(1); // ^
S_StartVoidSound(g_sfx_stnmov); // |
return true; // phares
if (dsda_InputActivated(dsda_input_cycle_palette))
{
dsda_CyclePlayPal();
doom_printf("Palette %s", dsda_PlayPalData()->lump_name);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

//e6y
Expand Down Expand Up @@ -5171,6 +5143,52 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
// return true;
}

// Pop-up Main menu?
if (ch == KEYD_ESCAPE || action == MENU_ESCAPE ||
(!in_game && (ch == KEYD_ENTER || ch == KEYD_SPACEBAR ||
dsda_InputActivated(dsda_input_fire) || dsda_InputActivated(dsda_input_use) || dsda_InputActivated(dsda_input_menu_enter)))) // phares
{
M_StartControlPanel();
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_console))
{
if (dsda_OpenConsole())
S_StartVoidSound(g_sfx_swtchn);
return true;
}

{
int i;

for (i = 0; i < CONSOLE_SCRIPT_COUNT; ++i)
if (dsda_InputActivated(dsda_input_script_0 + i)) {
dsda_ExecuteConsoleScript(i);

return true;
}
}

if (dsda_InputActivated(dsda_input_zoomout))
{
if (automap_active)
return false;
M_SizeDisplay(0);
S_StartVoidSound(g_sfx_stnmov);
return true;
}

if (dsda_InputActivated(dsda_input_zoomin))
{ // jff 2/23/98
if (automap_active) // allow
return false; // key_hud==key_zoomin
M_SizeDisplay(1); // ^
S_StartVoidSound(g_sfx_stnmov); // |
return true; // phares
}

if (dsda_InputActivated(dsda_input_nextlevel))
{
if (userplayback && !dsda_SkipMode())
Expand Down Expand Up @@ -5237,22 +5255,6 @@ static dboolean M_InactiveMenuResponder(int ch, int action, event_t* ev)
return true;
}

if (dsda_InputActivated(dsda_input_cycle_profile))
{
int value = dsda_CycleConfig(dsda_config_input_profile, true);
doom_printf("Input Profile %d", value);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_cycle_palette))
{
dsda_CyclePlayPal();
doom_printf("Palette %s", dsda_PlayPalData()->lump_name);
S_StartVoidSound(g_sfx_swtchn);
return true;
}

if (dsda_InputActivated(dsda_input_walkcamera))
{
if (demoplayback && gamestate == GS_LEVEL)
Expand Down
Loading