Skip to content

Commit

Permalink
Fix linux/ps3 incompatibility. Fixes #2
Browse files Browse the repository at this point in the history
  • Loading branch information
isage committed May 14, 2024
1 parent facd387 commit 91cda5f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions module/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ static int sendHid01Report(uint8_t report_id)
return ksceUdcdReqSend(&req);
}

static int sendHidF2Report(uint8_t report_id) // set operational
static int sendHidF2Report(uint8_t report_id, uint16_t length) // set operational
{
static uint8_t f2_reply[18] __attribute__((aligned(64)))
= {0xf2, // report num
Expand All @@ -151,6 +151,8 @@ static int sendHidF2Report(uint8_t report_id) // set operational
.unused = NULL,
.physicalAddress = NULL};

req.size = length;

return ksceUdcdReqSend(&req);
}

Expand Down Expand Up @@ -544,7 +546,7 @@ static int processUdcdRequest(int recipient, int arg, SceUdcdEP0DeviceRequest *r
break;

case 0xF2: // device address
sendHidF2Report(report_id);
sendHidF2Report(report_id, req->wLength);
break;

case 0xF4: // start device? switch to bt?
Expand Down

0 comments on commit 91cda5f

Please sign in to comment.