Closed Fewnity closed 1 month ago
My bad, looks like I have to use ioPadClearBuf after ioPadGetData, but not sure why.
Well, looks like the ioPadGetData
function is broken
int controllerIndex = 0;
padData paddata = padData();
s32 result = ioPadGetData(controllerIndex, &paddata);
// Print button array values
ioPadClearBuf(controllerIndex);
Sometimes between 0 to 10 times each seconds the paddata is not filled, I have all variable set to 0. Even the "seven" variable of the structure is set to 0. result is always equals to 0.
I'm using ioPadPeriphGetData
instead and now it's working, I can get inputs without getting a 0 filled struct.
Found the problem, I updated the doc here: https://github.com/ps3dev/PSL1GHT/pull/149
I'm trying to use ioPadGetData(0, &paddata) to read the input. When the X button is pressed I got 1 in paddata.BTN_CROSS, but the next frame, paddata.BTN_CROSS equals 0 but I'm still pressing X. So I don't understand how to detect if I'm still pressing the X button.
Any idea? Thanks!