Skip to content

Commit

Permalink
alt-scroll for volume up and down
Browse files Browse the repository at this point in the history
  • Loading branch information
timbergeron committed Jan 13, 2022
1 parent bcfa6c4 commit e6a5233
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion Quake/keys.c
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ void Key_Event (int key, qboolean down)
}

#if defined(PLATFORM_OSX) || defined(PLATFORM_MAC) // woods #shortcuts
if (!(scr_conscale.value < -1) || !(scr_sbarscale.value < -1)) // min clamp
if (!(scr_conscale.value < -1) || !(scr_sbarscale.value < -1)) // min clamp
if (down && (key == K_MWHEELDOWN) && keydown[K_COMMAND])
{
Cmd_ExecuteString("inc scr_conscale -.1\n", src_command);
Expand All @@ -1425,6 +1425,24 @@ void Key_Event (int key, qboolean down)
return;
}

if (sfxvolume.value < 1) // min clamp
if (down && (key == K_MWHEELUP) && keydown[K_ALT]) // woods #shortcuts
{
Cmd_ExecuteString("inc volume .02\n", src_command);
if (!strcmp(mute, "y"))
Sound_Toggle_Mute_f();
return;
}

if (sfxvolume.value > 0)// min clamp
if (down && (key == K_MWHEELDOWN) && keydown[K_ALT]) // woods #shortcuts
{
Cmd_ExecuteString("inc volume -.02\n", src_command);
if (!strcmp(mute, "y"))
Sound_Toggle_Mute_f();
return;
}

#if defined(PLATFORM_OSX) || defined(PLATFORM_MAC) // woods #shortcuts
if (down && (key == 'm') && keydown[K_COMMAND])
{
Expand Down

0 comments on commit e6a5233

Please sign in to comment.