From 99632b84f16554a7bc59068066af6cf38585efe9 Mon Sep 17 00:00:00 2001 From: dborth Date: Mon, 22 Jun 2009 20:04:19 +0000 Subject: [PATCH] don't wait for network init before entering game --- source/ngc/fileop.cpp | 7 ++++++- source/ngc/networkop.cpp | 2 +- source/ngc/networkop.h | 1 + source/ngc/pad.h | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/source/ngc/fileop.cpp b/source/ngc/fileop.cpp index 8120ed0..237931a 100644 --- a/source/ngc/fileop.cpp +++ b/source/ngc/fileop.cpp @@ -74,6 +74,11 @@ HaltDeviceThread() { deviceHalt = true; + #ifdef HW_RVL + if(inNetworkInit) // don't wait for network to initialize + return; + #endif + // wait for thread to finish while(!LWP_ThreadIsSuspended(devicethread)) usleep(100); @@ -119,8 +124,8 @@ devicecallback (void *arg) } } - InitializeNetwork(SILENT); UpdateCheck(); + InitializeNetwork(SILENT); #else if(isMounted[METHOD_SD_SLOTA]) { diff --git a/source/ngc/networkop.cpp b/source/ngc/networkop.cpp index df81cab..f7cef03 100644 --- a/source/ngc/networkop.cpp +++ b/source/ngc/networkop.cpp @@ -24,7 +24,7 @@ #include "http.h" #include "filebrowser.h" -static bool inNetworkInit = false; +bool inNetworkInit = false; static bool networkInit = false; static bool autoNetworkInit = true; static bool networkShareInit = false; diff --git a/source/ngc/networkop.h b/source/ngc/networkop.h index 93a7394..40e3f53 100644 --- a/source/ngc/networkop.h +++ b/source/ngc/networkop.h @@ -19,5 +19,6 @@ bool ConnectShare (bool silent); void CloseShare(); extern bool updateFound; +extern bool inNetworkInit; #endif diff --git a/source/ngc/pad.h b/source/ngc/pad.h index 86d458f..867de58 100644 --- a/source/ngc/pad.h +++ b/source/ngc/pad.h @@ -25,7 +25,7 @@ extern int rumbleRequest[4]; extern u32 btnmap[2][4][12]; void SetControllers(); -void ResetControls(int wc = 0, int cc = 0); +void ResetControls(int cc = 0, int wc = 0); void ShutoffRumble(); void DoRumble(int i); s8 WPAD_StickX(u8 chan,u8 right);