mirror of
https://github.com/Maschell/controller_patcher.git
synced 2024-11-22 12:09:16 +01:00
Update README.md
This commit is contained in:
parent
0f6d2945fc
commit
3605af8358
13
README.md
13
README.md
@ -48,11 +48,24 @@ Take a look at the [HID to VPAD](https://github.com/Maschell/hid_to_vpad) source
|
|||||||
|
|
||||||
Once you set up everything correctly, you can use the "setControllerDataFromHID" method to fill a VPADData pointer. Example:
|
Once you set up everything correctly, you can use the "setControllerDataFromHID" method to fill a VPADData pointer. Example:
|
||||||
```
|
```
|
||||||
|
#include "controller_patcher/controller_patcher.h"
|
||||||
|
|
||||||
VPADData buffer;
|
VPADData buffer;
|
||||||
setControllerDataFromHID(&buffer,HID_ALL_CONNECTED_DEVICES);
|
setControllerDataFromHID(&buffer,HID_ALL_CONNECTED_DEVICES);
|
||||||
```
|
```
|
||||||
This example will add the input from ALL connected HID devices into the created VPADData.
|
This example will add the input from ALL connected HID devices into the created VPADData.
|
||||||
|
|
||||||
|
To remap the gamepad buttons. Use something like this:
|
||||||
|
```
|
||||||
|
#include "controller_patcher/cp_retain_vars.h"
|
||||||
|
#include "controller_patcher/controller_patcher.h"
|
||||||
|
|
||||||
|
if(gButtonRemappingConfigDone && gConfig_done){
|
||||||
|
buttonRemapping(buffer);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
The postion of the mouse cursor can be read from here:
|
The postion of the mouse cursor can be read from here:
|
||||||
```
|
```
|
||||||
#include "controller_patcher/cp_retain_vars.h"
|
#include "controller_patcher/cp_retain_vars.h"
|
||||||
|
Loading…
Reference in New Issue
Block a user