[SNDVOL32] Add CTRL-S hotkey to switch between Small/Normal modes (#6867)

This adds a hotkey (CTRL-S) which switches between the Normal and Small
modes of the Volume Control window (also seen in Windows XP).

CORE-17043

Signed-off-by: Connie Julie <alexnicolas155@yahoo.com>
This commit is contained in:
Connie Sarah 2024-05-11 11:22:39 +03:00 committed by GitHub
parent 06e89b2e81
commit ede7389fb6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 15 additions and 0 deletions

View file

@ -971,6 +971,7 @@ MainWindowProc(HWND hwnd,
case IDM_EXIT:
{
PostQuitMessage(0);
UnregisterHotKey(hwnd, HOTKEY_CTRL_S);
break;
}
@ -1248,6 +1249,8 @@ MainWindowProc(HWND hwnd,
Result = -1;
}
}
RegisterHotKey(hwnd, HOTKEY_CTRL_S, MOD_CONTROL, 'S');
break;
}
@ -1275,6 +1278,16 @@ MainWindowProc(HWND hwnd,
break;
}
case WM_HOTKEY:
{
if (wParam == HOTKEY_CTRL_S)
{
Preferences.MixerWindow->Mode = (Preferences.MixerWindow->Mode == NORMAL_MODE ? SMALL_MODE : NORMAL_MODE);
RebuildMixerWindowControls(&Preferences);
}
break;
}
default:
{
Result = DefWindowProc(hwnd,

View file

@ -31,6 +31,8 @@
#define ADVANCED_BUTTON_HEIGHT 16
#define HOTKEY_CTRL_S 1
typedef enum _WINDOW_MODE
{
NORMAL_MODE,