Show IDC_INFO only when necessary

Checking the video encoder should be sufficient, as long as noone adds
a audio encoding only mode
master
palana 2014-07-16 14:34:22 +02:00
parent 10cc397617
commit 38160ee2e9
5 changed files with 33 additions and 14 deletions

View File

@ -535,7 +535,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
BOOL bUseVideoEncoderSettings = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED;
EnableWindow(GetDlgItem(hwnd, IDC_VIDEOENCODERSETTINGS), bUseVideoEncoderSettings);
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;
@ -546,7 +547,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
bool useSettings = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED;
EnableWindow(GetDlgItem(hwnd, IDC_QSVVIDEOENCODERSETTINGS), useSettings);
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;
@ -558,7 +560,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
case IDC_LATENCYTUNE:
if(HIWORD(wParam) == EN_CHANGE)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;
@ -580,7 +583,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
BOOL bUseSendBuffer = SendMessage((HWND)lParam, BM_GETCHECK, 0, 0) == BST_CHECKED;
EnableWindow(GetDlgItem(hwnd, IDC_SENDBUFFERSIZE), bUseSendBuffer);
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;
@ -601,7 +605,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
}
SetChangedSettings(true);
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
}
break;
@ -613,7 +618,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
case IDC_QSVPRESET:
if(HIWORD(wParam) == CBN_SELCHANGE || HIWORD(wParam) == CBN_EDITCHANGE)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;
@ -629,7 +635,8 @@ INT_PTR SettingsAdvanced::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
case IDC_LATENCYMETHOD:
if(HIWORD(wParam) == BN_CLICKED)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;

View File

@ -459,7 +459,8 @@ INT_PTR SettingsAudio::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
if(bDataChanged)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;

View File

@ -410,13 +410,21 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
SetWindowText(GetDlgItem(hwnd, IDC_BUFFERSIZE), strText);
}
bDataChanged = true;
if (App->GetVideoEncoder() && App->GetVideoEncoder()->DynamicBitrateSupported())
SetChangedSettings(true);
else
bDataChanged = true;
}
break;
case IDC_BUFFERSIZE:
if(HIWORD(wParam) == EN_CHANGE)
bDataChanged = true;
if (HIWORD(wParam) == EN_CHANGE)
{
if (App->GetVideoEncoder() && App->GetVideoEncoder()->DynamicBitrateSupported())
SetChangedSettings(true);
else
bDataChanged = true;
}
break;
case IDC_ENCODERX264:
@ -450,7 +458,8 @@ INT_PTR SettingsEncoding::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam
if(bDataChanged)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;

View File

@ -1091,7 +1091,8 @@ INT_PTR SettingsPublish::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
if(bDataChanged)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;

View File

@ -558,7 +558,8 @@ INT_PTR SettingsVideo::ProcMessage(UINT message, WPARAM wParam, LPARAM lParam)
if(bDataChanged)
{
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
if (App->GetVideoEncoder())
ShowWindow(GetDlgItem(hwnd, IDC_INFO), SW_SHOW);
SetChangedSettings(true);
}
break;