diff --git a/libs/RVL_SDK/include/private/wpad/WPADInternal.h b/libs/RVL_SDK/include/private/wpad/WPADInternal.h index 81a979a4..cd94775d 100644 --- a/libs/RVL_SDK/include/private/wpad/WPADInternal.h +++ b/libs/RVL_SDK/include/private/wpad/WPADInternal.h @@ -133,11 +133,11 @@ typedef struct WPADExtConfig { union { struct WPADFSConfig { s16 stickXCenter; // 0x00 - s16 unk_0x02; // 0x02 - s16 unk_0x04; // 0x04 + s16 stickXMin; // 0x02 + s16 stickXMax; // 0x04 s16 stickYCenter; // 0x06 - s16 unk_0x08; // 0x08 - s16 unk_0x0A; // 0x0A + s16 stickYMin; // 0x08 + s16 stickYMax; // 0x0A s16 accX0g; // 0x0C s16 accY0g; // 0x0E @@ -150,18 +150,18 @@ typedef struct WPADExtConfig { struct WPADCLConfig { s16 lStickXCenter; // 0x00 - s16 unk_0x02; // 0x02 - s16 unk_0x04; // 0x04 + s16 lStickXMin; // 0x02 + s16 lStickXMax; // 0x04 s16 lStickYCenter; // 0x06 - s16 unk_0x08; // 0x08 - s16 unk_0x0A; // 0x0A + s16 lStickYMin; // 0x08 + s16 lStickYMax; // 0x0A s16 rStickXCenter; // 0x0C - s16 unk_0x0E; // 0x0E - s16 unk_0x10; // 0x10 + s16 rStickXMin; // 0x0E + s16 rStickXMax; // 0x10 s16 rStickYCenter; // 0x12 - s16 unk_0x14; // 0x14 - s16 unk_0x16; // 0x16 + s16 rStickYMin; // 0x14 + s16 rStickYMax; // 0x16 u8 triggerLZero; // 0x18 u8 triggerRZero; // 0x19 diff --git a/libs/RVL_SDK/src/wpad/WPADHIDParser.c b/libs/RVL_SDK/src/wpad/WPADHIDParser.c index cb2235f9..08ab11aa 100644 --- a/libs/RVL_SDK/src/wpad/WPADHIDParser.c +++ b/libs/RVL_SDK/src/wpad/WPADHIDParser.c @@ -393,48 +393,48 @@ static void getExtConfig(s32 chan, s32 result) { p_wpd->extConfig.u.fs.accX1g = (s16)((u16)(((u16)(p_buf[index + 4]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 4) & 3)); p_wpd->extConfig.u.fs.accY1g = (s16)((u16)(((u16)(p_buf[index + 5]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7]) >> 2) & 3)); p_wpd->extConfig.u.fs.accZ1g = (s16)((u16)(((u16)(p_buf[index + 6]) << 2) & 0xFFFC) | (u16)(((u16)(p_buf[index + 7])) & 3)); - p_wpd->extConfig.u.fs.unk_0x04 = (s8)p_buf[index + 8]; - p_wpd->extConfig.u.fs.unk_0x02 = (s8)p_buf[index + 9]; + p_wpd->extConfig.u.fs.stickXMax = (s8)p_buf[index + 8]; + p_wpd->extConfig.u.fs.stickXMin = (s8)p_buf[index + 9]; p_wpd->extConfig.u.fs.stickXCenter = (s8)p_buf[index + 10]; - p_wpd->extConfig.u.fs.unk_0x0A = (s8)p_buf[index + 11]; - p_wpd->extConfig.u.fs.unk_0x08 = (s8)p_buf[index + 12]; + p_wpd->extConfig.u.fs.stickYMax = (s8)p_buf[index + 11]; + p_wpd->extConfig.u.fs.stickYMin = (s8)p_buf[index + 12]; p_wpd->extConfig.u.fs.stickYCenter = (s8)p_buf[index + 13]; DEBUGPrint("0G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX0g, p_wpd->extConfig.u.fs.accY0g, p_wpd->extConfig.u.fs.accZ0g); DEBUGPrint("1G: fsaccX = %d, fsaccY = %d, fsaccZ = %d\n", p_wpd->extConfig.u.fs.accX1g, p_wpd->extConfig.u.fs.accY1g, p_wpd->extConfig.u.fs.accZ1g); - DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.unk_0x04, - p_wpd->extConfig.u.fs.unk_0x02); - DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.unk_0x0A, - p_wpd->extConfig.u.fs.unk_0x08); + DEBUGPrint("FS: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.fs.stickXCenter, p_wpd->extConfig.u.fs.stickXMax, + p_wpd->extConfig.u.fs.stickXMin); + DEBUGPrint("FS: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.fs.stickYCenter, p_wpd->extConfig.u.fs.stickYMax, + p_wpd->extConfig.u.fs.stickYMin); } break; case WPAD_DEV_CLASSIC: - p_wpd->extConfig.u.cl.unk_0x04 = (s8)p_buf[index + 0]; - p_wpd->extConfig.u.cl.unk_0x02 = (s8)p_buf[index + 1]; + p_wpd->extConfig.u.cl.lStickXMax = (s8)p_buf[index + 0]; + p_wpd->extConfig.u.cl.lStickXMin = (s8)p_buf[index + 1]; p_wpd->extConfig.u.cl.lStickXCenter = (s8)p_buf[index + 2]; - p_wpd->extConfig.u.cl.unk_0x0A = (s8)p_buf[index + 3]; - p_wpd->extConfig.u.cl.unk_0x08 = (s8)p_buf[index + 4]; + p_wpd->extConfig.u.cl.lStickYMax = (s8)p_buf[index + 3]; + p_wpd->extConfig.u.cl.lStickYMin = (s8)p_buf[index + 4]; p_wpd->extConfig.u.cl.lStickYCenter = (s8)p_buf[index + 5]; - p_wpd->extConfig.u.cl.unk_0x10 = (s8)p_buf[index + 6]; - p_wpd->extConfig.u.cl.unk_0x0E = (s8)p_buf[index + 7]; + p_wpd->extConfig.u.cl.rStickXMax = (s8)p_buf[index + 6]; + p_wpd->extConfig.u.cl.rStickXMin = (s8)p_buf[index + 7]; p_wpd->extConfig.u.cl.rStickXCenter = (s8)p_buf[index + 8]; - p_wpd->extConfig.u.cl.unk_0x16 = (s8)p_buf[index + 9]; - p_wpd->extConfig.u.cl.unk_0x14 = (s8)p_buf[index + 10]; + p_wpd->extConfig.u.cl.rStickYMax = (s8)p_buf[index + 9]; + p_wpd->extConfig.u.cl.rStickYMin = (s8)p_buf[index + 10]; p_wpd->extConfig.u.cl.rStickYCenter = (s8)p_buf[index + 11]; p_wpd->extConfig.u.cl.triggerLZero = p_buf[index + 12]; p_wpd->extConfig.u.cl.triggerRZero = p_buf[index + 13]; - DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.unk_0x04, - p_wpd->extConfig.u.cl.unk_0x02); - DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.unk_0x0A, - p_wpd->extConfig.u.cl.unk_0x08); - DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.unk_0x10, - p_wpd->extConfig.u.cl.unk_0x0E); - DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.unk_0x16, - p_wpd->extConfig.u.cl.unk_0x14); + DEBUGPrint("CL: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.lStickXCenter, p_wpd->extConfig.u.cl.lStickXMax, + p_wpd->extConfig.u.cl.lStickXMin); + DEBUGPrint("CL: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.lStickYCenter, p_wpd->extConfig.u.cl.lStickYMax, + p_wpd->extConfig.u.cl.lStickYMin); + DEBUGPrint("CR: X = %d, X max = %d, X min = %d\n", p_wpd->extConfig.u.cl.rStickXCenter, p_wpd->extConfig.u.cl.rStickXMax, + p_wpd->extConfig.u.cl.rStickXMin); + DEBUGPrint("CR: Y = %d, Y max = %d, Y min = %d\n", p_wpd->extConfig.u.cl.rStickYCenter, p_wpd->extConfig.u.cl.rStickYMax, + p_wpd->extConfig.u.cl.rStickYMin); DEBUGPrint("LR: L = %d, R = %d\n", p_wpd->extConfig.u.cl.triggerLZero, p_wpd->extConfig.u.cl.triggerRZero); break; }