return 0;
}
+extern int in_type[8];
+
void *hPAD1Driver = NULL;
void *hPAD2Driver = NULL;
static int reqPos, respSize, req;
static int ledStateReq44[8];
+static int PadMode[8]; /* 0 : digital 1: analog */
static unsigned char buf[256];
static unsigned char bufMulti[34] = { 0x80, 0x5a,
break;
case CMD_QUERY_MODEL_AND_MODE :
memcpy(buf, resp45, 8);
+ buf[4] = PadMode[padIndex];
break;
case CMD_QUERY_ACT :
memcpy(buf, resp46_00, 8);
//0x01 analog ON
//0x00 analog OFF
ledStateReq44[padIndex] = value;
+ PadMode[padIndex] = value;
break;
case CMD_QUERY_ACT :
//0x46
if (reqPos == 0) {
//mem the request number
req = value;
- //copy the default value of request response in buffer instead of the keystate
- initBufForRequest(port, value);
+
+ // Don't enable Analog/Vibration for a standard pad
+ if (in_type[port] == PSE_PAD_TYPE_STANDARD) {
+ ; // Pad keystate already in buffer
+ }
+ else
+ {
+ //copy the default value of request response in buffer instead of the keystate
+ initBufForRequest(port, value);
+ }
}
//if no new request the pad return 0xff, for signaling connected
//mem the vibration value for Large motor;
pad[port].Vib[1] = value;
//vibration
- vibrate(port);
+ if (in_type[port] != PSE_PAD_TYPE_STANDARD)
+ vibrate(port);
break;
}
break;