network setting tweak, minor changes

This commit is contained in:
dborth 2008-09-07 23:50:57 +00:00
parent 2c1af15a5b
commit 15d25fbe9d
5 changed files with 41 additions and 40 deletions

View File

@ -34,11 +34,16 @@ DefaultSettings ()
GCSettings.AutoLoad = 1;
GCSettings.AutoSave = 1;
// default SMB settings
strncpy (GCSettings.smbip, "192.168.0.1", 15); // IP Address of share server
strncpy (GCSettings.smbuser, "Wiiuser", 19); // Your share user
strncpy (GCSettings.smbpwd, "password", 19); // Your share user password
strncpy (GCSettings.smbshare, "SNES", 19); // Share name on server
// custom SMB settings
strncpy (GCSettings.smbip, "", 15); // IP Address of share server
strncpy (GCSettings.smbuser, "", 19); // Your share user
strncpy (GCSettings.smbpwd, "", 19); // Your share user password
strncpy (GCSettings.smbshare, "", 19); // Share name on server
GCSettings.smbip[15] = 0;
GCSettings.smbuser[19] = 0;
GCSettings.smbpwd[19] = 0;
GCSettings.smbshare[19] = 0;
GCSettings.gcip[0] = 0;
GCSettings.gwip[0] = 0;

View File

@ -242,7 +242,7 @@ S9xGetFilenameInc (const char *e, enum s9x_getdirtype dirtype)
void
S9xAutoSaveSRAM ()
{
//Memory.SaveSRAM (S9xGetFilename (".srm", SRAM_DIR));
}
/*** Sound based functions ***/

View File

@ -89,6 +89,13 @@ ConnectShare (bool silent)
return false;
#endif
// check that all parameter have been set
if(strlen(GCSettings.smbuser) == 0 ||
strlen(GCSettings.smbpwd) == 0 ||
strlen(GCSettings.smbshare) == 0 ||
strlen(GCSettings.smbip) == 0)
return false;
if(!networkInit)
networkInit = InitializeNetwork(silent);

View File

@ -347,10 +347,10 @@ main ()
WPAD_SetVRes(WPAD_CHAN_ALL,640,480);
#endif
/*** Initialise GC ***/
InitGCVideo (); /*** Get the ball rolling ***/
// Initialise video
InitGCVideo ();
/*** Initialise freetype ***/
// Initialise freetype font system
if (FT_Init ())
{
printf ("Cannot initialise font subsystem!\n");
@ -359,38 +359,33 @@ main ()
unpackbackdrop ();
/*** Set defaults ***/
// Set defaults
DefaultSettings ();
S9xUnmapAllControls ();
SetDefaultButtonMap ();
//printf ("Initialise Memory\n");
/*** Allocate SNES Memory ***/
// Allocate SNES Memory
if (!Memory.Init ())
while (1);
//printf ("Initialise APU\n");
/*** Allocate APU ***/
// Allocate APU
if (!S9xInitAPU ())
while (1);
/*** Set Pixel Renderer to match 565 ***/
// Set Pixel Renderer to match 565
S9xSetRenderPixelFormat (RGB565);
/*** Initialise Snes Sound System ***/
// Initialise Snes Sound System
S9xInitSound (5, TRUE, 1024);
//printf ("Initialise GFX\n");
/*** Initialise Graphics ***/
// Initialise Graphics
setGFX ();
if (!S9xGraphicsInit ())
while (1);
// Initialize libFAT for SD and USB
fatInitDefault();
//fatInit(8192, false);
//fat_enable_readahead_all();
// Initialize DVD subsystem (GameCube only)
#ifndef HW_RVL
@ -414,13 +409,7 @@ main ()
selectedMenu = 2; // change to preferences menu
}
// Correct any relevant saved settings that are invalid
Settings.FrameTimeNTSC = 16667;
Settings.FrameTimePAL = 20000;
if ( Settings.TurboSkipFrames <= Settings.SkipFrames )
Settings.TurboSkipFrames = 20;
/*** No appended ROM, so get the user to load one ***/
// No appended ROM, so get the user to load one
if (ARAM_ROMSIZE == 0)
{
while (ARAM_ROMSIZE == 0)

View File

@ -84,7 +84,7 @@ preparesavedata (int method)
else
{
offset = 0;
WaitPrompt("No SRAM data to save!");
WaitPrompt((char *)"No SRAM data to save!");
}
return offset;