I am totally confused.
This is what I have
Code: Select all
//PSP_UTILITY_DIALOG_QUIT, /**< The dialog has been canceled and should be shut down */
//PSP_UTILITY_DIALOG_FINISHED /**< The dialog has successfully shut down */
int done = 0;
int netDialoginit()
{
done=0;
pspUtilityNetconfData data;
memset(&data, 0, sizeof(data));
data.base.size = sizeof(data);
data.base.language = PSP_SYSTEMPARAM_LANGUAGE_ENGLISH;
data.base.buttonSwap = PSP_UTILITY_ACCEPT_CROSS;
data.base.graphicsThread = 17;
data.base.accessThread = 19;
data.base.fontThread = 18;
data.base.soundThread = 16;
data.action = PSP_NETCONF_ACTION_CONNECTAP;
struct pspUtilityNetconfAdhoc adhocparam;
memset(&adhocparam, 0, sizeof(adhocparam));
data.adhocparam = &adhocparam;
sceUtilityNetconfInitStart(&data);
while(1)
{
drawStuff();
switch(sceUtilityNetconfGetStatus())
{
case PSP_UTILITY_DIALOG_NONE:
break;
case PSP_UTILITY_DIALOG_VISIBLE:
sceUtilityNetconfUpdate(1);
break;
case PSP_UTILITY_DIALOG_QUIT:
sceUtilityNetconfShutdownStart();
done=2;
break;
case PSP_UTILITY_DIALOG_FINISHED:
done = 1;
break;
default:
break;
}
sceDisplayWaitVblankStart();
sceGuSwapBuffers();
if(done)
break;
}
return 1;
}
Code: Select all
main()
{
netDialoginit();
pspDebugScreenClear();
pspDebugScreenClear();
if (done==1) pspDebugScreenPrintf("Connected to AP. Press X to connect to server");
if (done==2) pspDebugScreenPrintf("Not Connected to AP! Press Rtrigger.");
}
When Done=2 is there,
it shows Not Connected to AP EVEN if it is connected.
Shows correcty when is really is Not connected (we cancelled the dialog).
When I remove the above statement. It works fine BUT it DOESNOT detect when we cancel the dialog (Press O). IT shows "Connected to AP."
HELP!!!! :(
When I