Radeon Reset Bug fix service
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
RadeonResetBugFix/RadeonResetBugFixService/Devices/KnownDevices.cs

25 lines
943 B

namespace RadeonResetBugFixService.Devices
{
using System;
using System.Linq;
using Contracts;
static class KnownDevices
{
public static bool IsAmdVideo(DeviceInfo device)
{
return ((device.Manufacturer.Equals("AMD", StringComparison.OrdinalIgnoreCase) || device.Manufacturer.IndexOf("Advanced Micro Devices", StringComparison.OrdinalIgnoreCase) >= 0) &&
(device.Service.Equals("hdaudbus", StringComparison.OrdinalIgnoreCase) || device.ClassName.Equals("display", StringComparison.OrdinalIgnoreCase)));
}
public static bool IsVirtualVideo(DeviceInfo device)
{
return new[]
{
"hypervideo", // Hyper-V video adapter
"qxldod", // virtio/libvirt for Win8+
"qxl", // virtio/libvirt for Win7
}.Contains(device.Service, StringComparer.OrdinalIgnoreCase);
}
}
}