mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-10 07:39:39 +01:00
This commit is contained in:
parent
bea8e9ef9b
commit
01c8e93f87
@ -182,7 +182,7 @@ static void * netcb (void *arg)
|
|||||||
s32 res=-1;
|
s32 res=-1;
|
||||||
int retry;
|
int retry;
|
||||||
int wait;
|
int wait;
|
||||||
static bool first=true;
|
static bool prevInit = false;
|
||||||
|
|
||||||
while(netHalt != 2)
|
while(netHalt != 2)
|
||||||
{
|
{
|
||||||
@ -190,11 +190,11 @@ static void * netcb (void *arg)
|
|||||||
|
|
||||||
while (retry>0 && (netHalt != 2))
|
while (retry>0 && (netHalt != 2))
|
||||||
{
|
{
|
||||||
if(!first)
|
if(prevInit)
|
||||||
{
|
{
|
||||||
bool reset=false;
|
bool reset=false;
|
||||||
int i;
|
int i;
|
||||||
for(i=0;i<500 && (netHalt != 2);i++) // 10 seconds to try to reset
|
for(i=0; i < 500 && (netHalt != 2); i++) // 10 seconds to try to reset
|
||||||
{
|
{
|
||||||
res = net_get_status();
|
res = net_get_status();
|
||||||
if(res != -EBUSY) // trying to init net so we can't kill the net
|
if(res != -EBUSY) // trying to init net so we can't kill the net
|
||||||
@ -212,7 +212,7 @@ static void * netcb (void *arg)
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
first=false;
|
|
||||||
net_deinit();
|
net_deinit();
|
||||||
usleep(2000);
|
usleep(2000);
|
||||||
res = net_init_async(NULL, NULL);
|
res = net_init_async(NULL, NULL);
|
||||||
@ -245,6 +245,7 @@ static void * netcb (void *arg)
|
|||||||
{
|
{
|
||||||
strcpy(wiiIP, inet_ntoa(hostip));
|
strcpy(wiiIP, inet_ntoa(hostip));
|
||||||
networkInit = true;
|
networkInit = true;
|
||||||
|
prevInit = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(netHalt != 2) LWP_SuspendThread(networkthread);
|
if(netHalt != 2) LWP_SuspendThread(networkthread);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user