如何在本机活动中找到所有连接的输入设备?

时间:2015-07-25 20:44:38

标签: android android-ndk native-activity

在我的Android原生活动中,我想找到连接到Android设备的所有游戏控制器。

在input.h中,AInputEvent_getDeviceId()上面有一条注释,上面写着

/*
* An input device id of 0 indicates that the event didn't come from a physical device;
* other numbers are arbitrary and you shouldn't depend on the values.
* Use the provided input device query API to obtain information about input devices.
*/

有谁知道哪个"提供了输入设备查询API"评论是指?

如果我找不到所有已连接的设备,那么我可以等到按下AKEYCODE_BUTTON_START,然后将该设备指定为Player1 ...

谢谢!

0 个答案:

没有答案
相关问题