mirror of
https://github.com/dborth/vbagx.git
synced 2024-11-01 00:15:10 +01:00
enable SMB on GameCube (thanks Extrems!)
This commit is contained in:
parent
817557d88b
commit
b69c51b8cf
@ -41,7 +41,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with
|
||||
#---------------------------------------------------------------------------------
|
||||
LIBS := -lpng -lmxml -lfat -liso9660 -lz -logc -lfreetype
|
||||
LIBS := -lpng -lmxml -ltinysmb -lbba -lfat -liso9660 -lz -logc -lfreetype
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# list of directories containing libraries, this must be the top level containing
|
||||
|
@ -546,15 +546,6 @@ int BrowserChangeFolder()
|
||||
browserList[i].isdir = 1;
|
||||
browserList[i].icon = ICON_USB;
|
||||
i++;
|
||||
|
||||
AddBrowserEntry();
|
||||
sprintf(browserList[i].filename, "smb:/");
|
||||
sprintf(browserList[i].displayname, "Network Share");
|
||||
browserList[i].length = 0;
|
||||
browserList[i].mtime = 0;
|
||||
browserList[i].isdir = 1;
|
||||
browserList[i].icon = ICON_SMB;
|
||||
i++;
|
||||
#else
|
||||
AddBrowserEntry();
|
||||
sprintf(browserList[i].filename, "carda:/");
|
||||
@ -574,6 +565,15 @@ int BrowserChangeFolder()
|
||||
browserList[i].icon = ICON_SD;
|
||||
i++;
|
||||
#endif
|
||||
AddBrowserEntry();
|
||||
sprintf(browserList[i].filename, "smb:/");
|
||||
sprintf(browserList[i].displayname, "Network Share");
|
||||
browserList[i].length = 0;
|
||||
browserList[i].mtime = 0;
|
||||
browserList[i].isdir = 1;
|
||||
browserList[i].icon = ICON_SMB;
|
||||
i++;
|
||||
|
||||
AddBrowserEntry();
|
||||
sprintf(browserList[i].filename, "dvd:/");
|
||||
sprintf(browserList[i].displayname, "Data DVD");
|
||||
|
@ -411,11 +411,9 @@ bool ChangeInterface(int device, bool silent)
|
||||
case DEVICE_DVD:
|
||||
mounted = MountDVD(silent);
|
||||
break;
|
||||
#ifdef HW_RVL
|
||||
case DEVICE_SMB:
|
||||
mounted = ConnectShare(silent);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
|
||||
return mounted;
|
||||
|
@ -2986,11 +2986,7 @@ static int MenuSettings()
|
||||
w.Append(&titleTxt);
|
||||
w.Append(&savingBtn);
|
||||
w.Append(&menuBtn);
|
||||
|
||||
#ifdef HW_RVL
|
||||
w.Append(&networkBtn);
|
||||
#endif
|
||||
|
||||
w.Append(&backBtn);
|
||||
w.Append(&resetBtn);
|
||||
|
||||
@ -3163,14 +3159,6 @@ static int MenuSettingsFile()
|
||||
if(GCSettings.SaveMethod == DEVICE_DVD)
|
||||
GCSettings.SaveMethod++;
|
||||
|
||||
// disable SMB in GC mode (stalls out)
|
||||
#ifdef HW_DOL
|
||||
if(GCSettings.LoadMethod == DEVICE_SMB)
|
||||
GCSettings.LoadMethod++;
|
||||
if(GCSettings.SaveMethod == DEVICE_SMB)
|
||||
GCSettings.SaveMethod++;
|
||||
#endif
|
||||
|
||||
// don't allow SD Gecko on Wii
|
||||
#ifdef HW_RVL
|
||||
if(GCSettings.LoadMethod == DEVICE_SD_SLOTA)
|
||||
@ -3420,7 +3408,6 @@ static int MenuSettingsMenu()
|
||||
static int MenuSettingsNetwork()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
#ifdef HW_RVL
|
||||
int ret;
|
||||
int i = 0;
|
||||
bool firstRun = true;
|
||||
@ -3517,7 +3504,6 @@ static int MenuSettingsNetwork()
|
||||
mainWindow->Remove(&w);
|
||||
mainWindow->Remove(&titleTxt);
|
||||
CloseShare();
|
||||
#endif
|
||||
return menu;
|
||||
}
|
||||
|
||||
|
@ -8,16 +8,6 @@
|
||||
* Network and SMB support routines
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef HW_DOL
|
||||
|
||||
bool
|
||||
ConnectShare (bool silent)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
#include <network.h>
|
||||
#include <malloc.h>
|
||||
#include <ogc/lwp_watchdog.h>
|
||||
@ -40,6 +30,8 @@ static bool updateChecked = false; // true if checked for app update
|
||||
static char updateURL[128]; // URL of app update
|
||||
bool updateFound = false; // true if an app update was found
|
||||
|
||||
#ifdef HW_RVL
|
||||
|
||||
/****************************************************************************
|
||||
* UpdateCheck
|
||||
* Checks for an update for the application
|
||||
@ -268,11 +260,15 @@ void StopNetworkThread()
|
||||
networkthread = LWP_THREAD_NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool InitializeNetwork(bool silent)
|
||||
{
|
||||
if(networkInit)
|
||||
{
|
||||
#ifdef HW_RVL
|
||||
StopNetworkThread();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -286,6 +282,8 @@ bool InitializeNetwork(bool silent)
|
||||
u64 start = gettime();
|
||||
|
||||
ShowAction("Initializing network...");
|
||||
|
||||
#ifdef HW_RVL
|
||||
StartNetworkThread();
|
||||
|
||||
while (!LWP_ThreadIsSuspended(networkthread))
|
||||
@ -295,6 +293,9 @@ bool InitializeNetwork(bool silent)
|
||||
if(diff_sec(start, gettime()) > 10) // wait for 10 seconds max for net init
|
||||
break;
|
||||
}
|
||||
#else
|
||||
networkInit = !(if_config(wiiIP, NULL, NULL, true) < 0);
|
||||
#endif
|
||||
|
||||
CancelAction();
|
||||
|
||||
@ -321,11 +322,6 @@ void CloseShare()
|
||||
bool
|
||||
ConnectShare (bool silent)
|
||||
{
|
||||
// Crashes or stalls system in GameCube mode - so disable
|
||||
#ifndef HW_RVL
|
||||
return false;
|
||||
#endif
|
||||
|
||||
if(!InitializeNetwork(silent))
|
||||
return false;
|
||||
|
||||
@ -375,5 +371,3 @@ ConnectShare (bool silent)
|
||||
|
||||
return networkShareInit;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user