USB: Resolve an EyeToy crash when no webcam is connected

This commit is contained in:
Florin9doi 2020-11-13 00:00:40 +02:00 committed by refractionpcsx2
parent 7117633204
commit 319287dbe5
1 changed files with 4 additions and 4 deletions

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;