[PATCH v2 4/5] dinput: Factor all GetDeviceState implementations together.