Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mpc-hc/LAVFilters.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHendrik Leppkes <h.leppkes@gmail.com>2017-08-19 13:13:28 +0300
committerHendrik Leppkes <h.leppkes@gmail.com>2017-08-19 13:13:28 +0300
commite00966544659bd7952e7452f73833a22405ecfdc (patch)
tree77ce353ef878474a950e92579c4c140238b0d5ec
parente945b65dc7ece09912fe4b6b2514cdcd5eb124b8 (diff)
Enable the device selection box if more then one device is available
Instead of hardcoding it to be availble for DXVA2-CB only.
-rw-r--r--decoder/LAVVideo/VideoSettingsProp.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/decoder/LAVVideo/VideoSettingsProp.cpp b/decoder/LAVVideo/VideoSettingsProp.cpp
index d1729cfe..75ebc5f2 100644
--- a/decoder/LAVVideo/VideoSettingsProp.cpp
+++ b/decoder/LAVVideo/VideoSettingsProp.cpp
@@ -383,9 +383,6 @@ HRESULT CLAVVideoSettingsProp::UpdateHWOptions()
SendDlgItemMessage(m_Dlg, IDC_HWACCEL_AVAIL, WM_SETTEXT, 0, (LPARAM)(hwAccel == HWAccel_None ? hwAccelEmpty : dwSupport == 0 ? hwAccelUnavailable : hwAccelAvailable));
- EnableWindow(GetDlgItem(m_Dlg, IDC_LBL_HWACCEL_DEVICE_SELECT), hwAccel == HWAccel_DXVA2CopyBack);
- EnableWindow(GetDlgItem(m_Dlg, IDC_HWACCEL_DEVICE_SELECT), hwAccel == HWAccel_DXVA2CopyBack);
-
const WCHAR hwHintNoDeviceChoice[] = L"The selected Hardware Decoder does not support using a specific device.";
const WCHAR hwHintDXVA2Display[] = L"DXVA2 requires an active display for GPUs to be available.\nNote that GPUs are listed once for each connected display.";
const WCHAR hwHintD3D11NotSupported[] = L"D3D11 requires Windows 8 or newer, and is not supported on this OS.";
@@ -409,6 +406,7 @@ HRESULT CLAVVideoSettingsProp::UpdateHWOptions()
if (hwAccel == HWAccel_D3D11 && !IsWindows8OrNewer())
{
m_HWDeviceIndex = 0;
+ dwnDevices = 0;
SendDlgItemMessage(m_Dlg, IDC_LBL_HWACCEL_DEVICE_HINT, WM_SETTEXT, 0, (LPARAM)hwHintD3D11NotSupported);
}
else if (dwnDevices == 0) {
@@ -431,6 +429,9 @@ HRESULT CLAVVideoSettingsProp::UpdateHWOptions()
SendDlgItemMessage(m_Dlg, IDC_LBL_HWACCEL_DEVICE_HINT, WM_SETTEXT, 0, (LPARAM)L"");
}
+ EnableWindow(GetDlgItem(m_Dlg, IDC_LBL_HWACCEL_DEVICE_SELECT), (dwnDevices > 0));
+ EnableWindow(GetDlgItem(m_Dlg, IDC_HWACCEL_DEVICE_SELECT), (dwnDevices > 0));
+
SendDlgItemMessage(m_Dlg, IDC_HWACCEL_DEVICE_SELECT, CB_SETCURSEL, m_HWDeviceIndex, 0);
return S_OK;