mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-11 20:04:28 +01:00
enable SMB on GameCube (thanks Extrems!)
This commit is contained in:
parent
af9f19218d
commit
322e1575b7
@ -39,7 +39,7 @@ LDFLAGS = -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
#---------------------------------------------------------------------------------
|
||||
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
|
||||
|
@ -579,15 +579,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:/");
|
||||
@ -607,6 +598,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");
|
||||
|
@ -413,11 +413,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;
|
||||
|
@ -3227,11 +3227,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);
|
||||
|
||||
@ -3403,14 +3399,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)
|
||||
@ -3663,7 +3651,6 @@ static int MenuSettingsMenu()
|
||||
static int MenuSettingsNetwork()
|
||||
{
|
||||
int menu = MENU_NONE;
|
||||
#ifdef HW_RVL
|
||||
int ret;
|
||||
int i = 0;
|
||||
bool firstRun = true;
|
||||
@ -3760,7 +3747,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
|
||||
@ -270,11 +262,15 @@ void StopNetworkThread()
|
||||
networkthread = LWP_THREAD_NULL;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
bool InitializeNetwork(bool silent)
|
||||
{
|
||||
if(networkInit)
|
||||
{
|
||||
#ifdef HW_RVL
|
||||
StopNetworkThread();
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -288,6 +284,8 @@ bool InitializeNetwork(bool silent)
|
||||
u64 start = gettime();
|
||||
|
||||
ShowAction("Initializing network...");
|
||||
|
||||
#ifdef HW_RVL
|
||||
StartNetworkThread();
|
||||
|
||||
while (!LWP_ThreadIsSuspended(networkthread))
|
||||
@ -297,6 +295,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();
|
||||
|
||||
@ -323,11 +324,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;
|
||||
|
||||
@ -377,5 +373,3 @@ ConnectShare (bool silent)
|
||||
|
||||
return networkShareInit;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Loading…
Reference in New Issue
Block a user