2

在我的 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 ...

谢谢!

4

0 回答 0