parent
81231d7194
commit
636d408593
|
@ -62,7 +62,7 @@ public:
|
||||||
|
|
||||||
class SettingsEncoding : public SettingsPane
|
class SettingsEncoding : public SettingsPane
|
||||||
{
|
{
|
||||||
bool hasQSV, hasNVENC, useCBR;
|
bool hasQSV, hasNVENC;
|
||||||
//-----------------------------------------------------------------------
|
//-----------------------------------------------------------------------
|
||||||
// Constructor/destructor
|
// Constructor/destructor
|
||||||
|
|
||||||
|
|
|
@ -205,19 +205,12 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
|
||||||
|
|
||||||
//--------------------------------------------
|
//--------------------------------------------
|
||||||
|
|
||||||
useCBR = AppConfig->GetInt(TEXT("Video Encoding"), TEXT("UseCBR"), 1) != 0;
|
bool bUseCBR = AppConfig->GetInt(TEXT("Video Encoding"), TEXT("UseCBR"), 1) != 0;
|
||||||
bool bPadCBR = AppConfig->GetInt(TEXT("Video Encoding"), TEXT("PadCBR"), 1) != 0;
|
bool bPadCBR = AppConfig->GetInt(TEXT("Video Encoding"), TEXT("PadCBR"), 1) != 0;
|
||||||
SendMessage(GetDlgItem(hwnd, IDC_USECBR), BM_SETCHECK, useCBR ? BST_CHECKED : BST_UNCHECKED, 0);
|
SendMessage(GetDlgItem(hwnd, IDC_USECBR), BM_SETCHECK, bUseCBR ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||||
SendMessage(GetDlgItem(hwnd, IDC_PADCBR), BM_SETCHECK, bPadCBR ? BST_CHECKED : BST_UNCHECKED, 0);
|
SendMessage(GetDlgItem(hwnd, IDC_PADCBR), BM_SETCHECK, bPadCBR ? BST_CHECKED : BST_UNCHECKED, 0);
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_QUALITY), !useCBR && (usex264 || useNVENC));
|
EnableWindow(GetDlgItem(hwnd, IDC_QUALITY), !bUseCBR && (usex264 || useNVENC));
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), useCBR && usex264);
|
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), bUseCBR && usex264);
|
||||||
|
|
||||||
if (useNVENC)
|
|
||||||
{
|
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_USECBR), false);
|
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), false);
|
|
||||||
SendMessage(GetDlgItem(hwnd, IDC_USECBR), BM_SETCHECK, BST_UNCHECKED, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
ti.lpszText = (LPWSTR)Str("Settings.Advanced.PadCBRToolTip");
|
ti.lpszText = (LPWSTR)Str("Settings.Advanced.PadCBRToolTip");
|
||||||
ti.uId = (UINT_PTR)GetDlgItem(hwnd, IDC_PADCBR);
|
ti.uId = (UINT_PTR)GetDlgItem(hwnd, IDC_PADCBR);
|
||||||
|
@ -332,6 +325,8 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
|
||||||
bool useNVENC = SendMessage(GetDlgItem(hwnd, IDC_ENCODERNVENC), BM_GETCHECK, 0, 0) == BST_CHECKED;
|
bool useNVENC = SendMessage(GetDlgItem(hwnd, IDC_ENCODERNVENC), BM_GETCHECK, 0, 0) == BST_CHECKED;
|
||||||
bool usex264 = !useQSV && !useNVENC;
|
bool usex264 = !useQSV && !useNVENC;
|
||||||
|
|
||||||
|
bool useCBR = SendMessage(GetDlgItem(hwnd, IDC_USECBR), BM_GETCHECK, 0, 0) == BST_CHECKED;
|
||||||
|
|
||||||
switch(LOWORD(wParam))
|
switch(LOWORD(wParam))
|
||||||
{
|
{
|
||||||
case IDC_QUALITY:
|
case IDC_QUALITY:
|
||||||
|
@ -441,9 +436,6 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
|
||||||
if (HIWORD(wParam) == BN_CLICKED)
|
if (HIWORD(wParam) == BN_CLICKED)
|
||||||
bDataChanged = true;
|
bDataChanged = true;
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_USECBR), !useNVENC);
|
|
||||||
SendMessage(GetDlgItem(hwnd, IDC_USECBR), BM_SETCHECK, !useNVENC && useCBR ? BST_CHECKED : BST_UNCHECKED, 0);
|
|
||||||
|
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_QUALITY), !useCBR && (usex264 || useNVENC));
|
EnableWindow(GetDlgItem(hwnd, IDC_QUALITY), !useCBR && (usex264 || useNVENC));
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), useCBR && usex264);
|
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), useCBR && usex264);
|
||||||
break;
|
break;
|
||||||
|
@ -462,9 +454,6 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
|
||||||
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), bChecked && usex264);
|
EnableWindow(GetDlgItem(hwnd, IDC_PADCBR), bChecked && usex264);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (LOWORD(wParam) == IDC_USECBR)
|
|
||||||
useCBR = bChecked;
|
|
||||||
|
|
||||||
bDataChanged = true;
|
bDataChanged = true;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Reference in New Issue