Update README.md

This commit is contained in:
Maschell 2016-08-04 09:44:54 +02:00 committed by GitHub
parent 0f6d2945fc
commit 3605af8358

View File

@ -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"