I am having trouble with the matchingcallback: it looks like it doesn't take any event into consideration. Here is my code (taken from PspPet)
Code: Select all
void matchingCallback(int unk1, int event, char *mac2, int optLen, char *optData)
{
// This is called when there is an event, dont seem to be able to call
// procs from here otherwise it causes a crash
printf("in the matching callback");
sceKernelDelayThread(5000*1000);
if(event==MATCHING_JOINED)
{
AddPsp(mac2, optData, optLen);
}
else if(event==MATCHING_DISCONNECT)
{
DelPsp(mac2);
}
else
{
g_unk1 = unk1;
g_matchEvent = event;
g_matchOptLen = optLen;
// Copy across the optional data
strncpy(g_matchOptData, optData, optLen);
// And the MAC address
memcpy(g_mac, mac2, sizeof(char) * 6);
matchChanged = 1;
}
}
Code: Select all
matchingId = sceNetAdhocMatchingCreate( 3,
0xA,
0x22B,
0x800,
0x2DC6C0,
0x5B8D80,
3,
0x7A120,
matchingCallback);
Thank you, any information would be useful...