Alistair Leslie-Hughes : dinput: Use a helper function to get device type.