开发者

Change which player the Xbox controller represents?

开发者 https://www.devze.com 2023-01-24 15:36 出处:网络
Does anyone know if there is a way to change which portion of the ring is lit 开发者_开发百科on the Xbox controller? For instance, I want the first controller to be plugged in to represent player 2 (i

Does anyone know if there is a way to change which portion of the ring is lit 开发者_开发百科on the Xbox controller? For instance, I want the first controller to be plugged in to represent player 2 (if player 1 opts to use keyboard/mouse input)

Thanks.


Use XInputRemap to remap the connected controllers to the users associated with those controllers. This is part of the XInput API. So if you have 2 players and want to swap their controller:

DWORD remap[XUSER_MAX_COUNT];
remap[0] = 1;
remap[1] = 0;
DWORD dwResult = XInputRemap(remap);

The SDK includes a sample the demonstrates this function.

0

精彩评论

暂无评论...
验证码 换一张
取 消