mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 16:51:23 +00:00
[SNDVOL32] Disable the balance trackbar for mono channels.
CORE-15743
This commit is contained in:
parent
008344fd09
commit
45f0d7413c
1 changed files with 27 additions and 12 deletions
|
@ -562,21 +562,36 @@ EnumConnectionsCallback(
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Set the balance trackbar */
|
if (Line->cChannels == 1)
|
||||||
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
|
||||||
|
|
||||||
/* get dialog control */
|
|
||||||
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
|
||||||
|
|
||||||
if (hDlgCtrl != NULL)
|
|
||||||
{
|
{
|
||||||
/* check state */
|
/* Disable the balance trackbar for mono channels */
|
||||||
LRESULT OldPosition = SendMessageW(hDlgCtrl, TBM_GETPOS, 0, 0);
|
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
||||||
|
|
||||||
if (OldPosition != balancePosition)
|
/* get dialog control */
|
||||||
|
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
||||||
|
if (hDlgCtrl != NULL)
|
||||||
{
|
{
|
||||||
/* update control state */
|
EnableWindow(hDlgCtrl, FALSE);
|
||||||
SendMessageW(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, balancePosition);
|
}
|
||||||
|
}
|
||||||
|
else if (Line->cChannels == 2)
|
||||||
|
{
|
||||||
|
/* Set the balance trackbar */
|
||||||
|
wID = (PrefContext->Count + 1) * IDC_LINE_SLIDER_HORZ;
|
||||||
|
|
||||||
|
/* get dialog control */
|
||||||
|
hDlgCtrl = GetDlgItem(PrefContext->MixerWindow->hWnd, wID);
|
||||||
|
|
||||||
|
if (hDlgCtrl != NULL)
|
||||||
|
{
|
||||||
|
/* check state */
|
||||||
|
LRESULT OldPosition = SendMessageW(hDlgCtrl, TBM_GETPOS, 0, 0);
|
||||||
|
|
||||||
|
if (OldPosition != balancePosition)
|
||||||
|
{
|
||||||
|
/* update control state */
|
||||||
|
SendMessageW(hDlgCtrl, TBM_SETPOS, (WPARAM)TRUE, balancePosition);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue