wined3d: Rearrange code in CheckDeviceType.