USB: Resolve an EyeToy crash when no webcam is connected

This commit is contained in:
Florin9doi authored and refractionpcsx2 committed 2020-11-13 00:15:55 +00:00
1 parent 7117633204
commit 319287dbe5
1 file changed
+4 -4
+4 -4
View File
@@ -64,8 +64,8 @@ namespace usb_eyetoy
}
IEnumMoniker* pEnum = 0;
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, NULL);
if (FAILED(hr))
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0);
if (hr != S_OK)
{
Console.Warning("You have no video capture hardware");
return devList;
@@ -148,8 +148,8 @@ namespace usb_eyetoy
}
IEnumMoniker* pEnum = 0;
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, NULL);
if (FAILED(hr))
hr = pCreateDevEnum->CreateClassEnumerator(CLSID_VideoInputDeviceCategory, &pEnum, 0);
if (hr != S_OK)
{
Console.Warning("You have no video capture hardware");
return -1;