[Wii U ] Proper order of the HID devices.

Added individual names for the HID devices.
This commit is contained in:
Maschell 2017-05-20 19:26:12 +02:00
parent b34abd4c17
commit 7a2c09e9ce
3 changed files with 8 additions and 6 deletions

View File

@ -58,7 +58,6 @@
#include <fat.h>
#include <iosuhax.h>
#include "wiiu_dbg.h"
#include "hbl.h"
@ -407,7 +406,6 @@ int main(int argc, char **argv)
#endif
verbosity_enable();
printf("starting\n");
ControllerPatcherInit();
fflush(stdout);

View File

@ -55,11 +55,13 @@ static uint64_t pad_state[MAX_PADS];
static u8 pad_type[KPAD_COUNT] = {WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE, WIIUINPUT_TYPE_NONE};
static u8 hid_status[HID_COUNT];
static InputDataEx hid_data[HID_COUNT];
static InputData hid_data[HID_COUNT];
static int16_t analog_state[MAX_PADS][2][2];
extern uint64_t lifecycle_state;
static bool wiiu_pad_inited = false;
static char hidName[HID_COUNT][255];
static const char* wiiu_joypad_name(unsigned pad)
{
if (pad == 0)
@ -88,7 +90,9 @@ static const char* wiiu_joypad_name(unsigned pad)
}
if(pad < MAX_PADS){
return "HID Controller";
s32 hid_index = pad-HID_OFFSET;
sprintf(hidName[hid_index],"HID %04X/%04X",hid_data[hid_index].device_info.vidpid.vid,hid_data[hid_index].device_info.vidpid.pid);
return hidName[hid_index];
}
return "unknown";
@ -243,7 +247,7 @@ static void wiiu_joypad_poll(void)
}
memset(hid_data,0,sizeof(hid_data));
int result = gettingInputAllDevicesEx(hid_data,HID_COUNT);
int result = gettingInputAllDevices(hid_data,HID_COUNT);
if(result+HID_OFFSET > MAX_PADS){
result = MAX_PADS - HID_OFFSET;

@ -1 +1 @@
Subproject commit cd06b1b44ba94b6ab5c277e9d2fdaae1e8b6da6a
Subproject commit 0d419a0064bf95feec139e6484a00af20df08967