switch descriptor on the fly
switch descriptor on the fly
I was wondering if its possible to set up a new descriptor without unplugging the usb. In this cause I'm referring to a general HID game controller. I want to change the descriptor during game play. And most games get upset if the usb cable is disconnected. I'm guessing the normal usbDisconnect would do the same thing though unsure. So I was hopping to find a way to change from a 2 axis 8 button to a 4 axis 16 buttons for example. Of course the trick here being to do it while its still connected.
Re: switch descriptor on the fly
The descriptors are only read during enumeration. The only way to get the host to enumerate is via a connect event. That can be done by un- and then re-plugging the USB cable or by dis- and re-connecting the USB ID resistor (UsbConnect() & UsbDisconnect()).
Even if you could change the layout of the device during game play the game probably wouldn't recognize it. It would have to be written w/ changing controllers during game play in mind, AFAIK no game is. They all assume you have your hardware set up as you want it when the game starts.
Even if you could change the layout of the device during game play the game probably wouldn't recognize it. It would have to be written w/ changing controllers during game play in mind, AFAIK no game is. They all assume you have your hardware set up as you want it when the game starts.
Re: switch descriptor on the fly
thx Grendel, wanted to be sure.