mirror of
https://github.com/dborth/snes9xgx.git
synced 2024-12-12 12:24:34 +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
|
# 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
|
# list of directories containing libraries, this must be the top level containing
|
||||||
|
@ -579,15 +579,6 @@ int BrowserChangeFolder()
|
|||||||
browserList[i].isdir = 1;
|
browserList[i].isdir = 1;
|
||||||
browserList[i].icon = ICON_USB;
|
browserList[i].icon = ICON_USB;
|
||||||
i++;
|
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
|
#else
|
||||||
AddBrowserEntry();
|
AddBrowserEntry();
|
||||||
sprintf(browserList[i].filename, "carda:/");
|
sprintf(browserList[i].filename, "carda:/");
|
||||||
@ -607,6 +598,15 @@ int BrowserChangeFolder()
|
|||||||
browserList[i].icon = ICON_SD;
|
browserList[i].icon = ICON_SD;
|
||||||
i++;
|
i++;
|
||||||
#endif
|
#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();
|
AddBrowserEntry();
|
||||||
sprintf(browserList[i].filename, "dvd:/");
|
sprintf(browserList[i].filename, "dvd:/");
|
||||||
sprintf(browserList[i].displayname, "Data DVD");
|
sprintf(browserList[i].displayname, "Data DVD");
|
||||||
|
@ -413,11 +413,9 @@ bool ChangeInterface(int device, bool silent)
|
|||||||
case DEVICE_DVD:
|
case DEVICE_DVD:
|
||||||
mounted = MountDVD(silent);
|
mounted = MountDVD(silent);
|
||||||
break;
|
break;
|
||||||
#ifdef HW_RVL
|
|
||||||
case DEVICE_SMB:
|
case DEVICE_SMB:
|
||||||
mounted = ConnectShare(silent);
|
mounted = ConnectShare(silent);
|
||||||
break;
|
break;
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return mounted;
|
return mounted;
|
||||||
|
@ -3227,11 +3227,7 @@ static int MenuSettings()
|
|||||||
w.Append(&titleTxt);
|
w.Append(&titleTxt);
|
||||||
w.Append(&savingBtn);
|
w.Append(&savingBtn);
|
||||||
w.Append(&menuBtn);
|
w.Append(&menuBtn);
|
||||||
|
|
||||||
#ifdef HW_RVL
|
|
||||||
w.Append(&networkBtn);
|
w.Append(&networkBtn);
|
||||||
#endif
|
|
||||||
|
|
||||||
w.Append(&backBtn);
|
w.Append(&backBtn);
|
||||||
w.Append(&resetBtn);
|
w.Append(&resetBtn);
|
||||||
|
|
||||||
@ -3403,14 +3399,6 @@ static int MenuSettingsFile()
|
|||||||
if(GCSettings.SaveMethod == DEVICE_DVD)
|
if(GCSettings.SaveMethod == DEVICE_DVD)
|
||||||
GCSettings.SaveMethod++;
|
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
|
// don't allow SD Gecko on Wii
|
||||||
#ifdef HW_RVL
|
#ifdef HW_RVL
|
||||||
if(GCSettings.LoadMethod == DEVICE_SD_SLOTA)
|
if(GCSettings.LoadMethod == DEVICE_SD_SLOTA)
|
||||||
@ -3663,7 +3651,6 @@ static int MenuSettingsMenu()
|
|||||||
static int MenuSettingsNetwork()
|
static int MenuSettingsNetwork()
|
||||||
{
|
{
|
||||||
int menu = MENU_NONE;
|
int menu = MENU_NONE;
|
||||||
#ifdef HW_RVL
|
|
||||||
int ret;
|
int ret;
|
||||||
int i = 0;
|
int i = 0;
|
||||||
bool firstRun = true;
|
bool firstRun = true;
|
||||||
@ -3760,7 +3747,6 @@ static int MenuSettingsNetwork()
|
|||||||
mainWindow->Remove(&w);
|
mainWindow->Remove(&w);
|
||||||
mainWindow->Remove(&titleTxt);
|
mainWindow->Remove(&titleTxt);
|
||||||
CloseShare();
|
CloseShare();
|
||||||
#endif
|
|
||||||
return menu;
|
return menu;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -8,16 +8,6 @@
|
|||||||
* Network and SMB support routines
|
* Network and SMB support routines
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
#ifdef HW_DOL
|
|
||||||
|
|
||||||
bool
|
|
||||||
ConnectShare (bool silent)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#else
|
|
||||||
|
|
||||||
#include <network.h>
|
#include <network.h>
|
||||||
#include <malloc.h>
|
#include <malloc.h>
|
||||||
#include <ogc/lwp_watchdog.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
|
static char updateURL[128]; // URL of app update
|
||||||
bool updateFound = false; // true if an app update was found
|
bool updateFound = false; // true if an app update was found
|
||||||
|
|
||||||
|
#ifdef HW_RVL
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* UpdateCheck
|
* UpdateCheck
|
||||||
* Checks for an update for the application
|
* Checks for an update for the application
|
||||||
@ -270,11 +262,15 @@ void StopNetworkThread()
|
|||||||
networkthread = LWP_THREAD_NULL;
|
networkthread = LWP_THREAD_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
bool InitializeNetwork(bool silent)
|
bool InitializeNetwork(bool silent)
|
||||||
{
|
{
|
||||||
if(networkInit)
|
if(networkInit)
|
||||||
{
|
{
|
||||||
|
#ifdef HW_RVL
|
||||||
StopNetworkThread();
|
StopNetworkThread();
|
||||||
|
#endif
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -288,6 +284,8 @@ bool InitializeNetwork(bool silent)
|
|||||||
u64 start = gettime();
|
u64 start = gettime();
|
||||||
|
|
||||||
ShowAction("Initializing network...");
|
ShowAction("Initializing network...");
|
||||||
|
|
||||||
|
#ifdef HW_RVL
|
||||||
StartNetworkThread();
|
StartNetworkThread();
|
||||||
|
|
||||||
while (!LWP_ThreadIsSuspended(networkthread))
|
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
|
if(diff_sec(start, gettime()) > 10) // wait for 10 seconds max for net init
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
networkInit = !(if_config(wiiIP, NULL, NULL, true) < 0);
|
||||||
|
#endif
|
||||||
|
|
||||||
CancelAction();
|
CancelAction();
|
||||||
|
|
||||||
@ -323,11 +324,6 @@ void CloseShare()
|
|||||||
bool
|
bool
|
||||||
ConnectShare (bool silent)
|
ConnectShare (bool silent)
|
||||||
{
|
{
|
||||||
// Crashes or stalls system in GameCube mode - so disable
|
|
||||||
#ifndef HW_RVL
|
|
||||||
return false;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if(!InitializeNetwork(silent))
|
if(!InitializeNetwork(silent))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
@ -377,5 +373,3 @@ ConnectShare (bool silent)
|
|||||||
|
|
||||||
return networkShareInit;
|
return networkShareInit;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
Loading…
Reference in New Issue
Block a user