sync up to other code bases

This commit is contained in:
dborth 2009-01-25 07:01:50 +00:00
parent 7a84a2492e
commit 07099ba282
5 changed files with 33 additions and 34 deletions

View File

@ -545,8 +545,7 @@ void SetDVDdirectory(u64 dir, int length)
***************************************************************************/
static int DirectorySearch(char dir[512])
{
int i;
for (i = 0; i < browser.numEntries; i++ )
for (int i = 0; i < browser.numEntries; i++ )
if (strcmp(browserList[i].filename, dir) == 0)
return i;
return -1;

View File

@ -121,7 +121,7 @@ int GCMemROM(int method, int size)
if(MakeFilePath(filepath, FILE_FDSBIOS, method))
{
biosSize = LoadFileBuf (tmpbuffer, filepath, 0, method, SILENT);
biosSize = LoadFile (tmpbuffer, filepath, 0, method, SILENT);
}
if(biosSize == 8192)

View File

@ -393,7 +393,7 @@ LoadSzFile(char * filepath, unsigned char * rbuffer)
* LoadFile
***************************************************************************/
u32
LoadFileBuf (char * rbuffer, char *filepath, u32 length, int method, bool silent)
LoadFile (char * rbuffer, char *filepath, u32 length, int method, bool silent)
{
char zipbuffer[2048];
u32 size = 0;
@ -483,7 +483,7 @@ LoadFileBuf (char * rbuffer, char *filepath, u32 length, int method, bool silent
u32 LoadFile(char filepath[], int method, bool silent)
{
return LoadFileBuf((char *)savebuffer, filepath, 0, method, silent);
return LoadFile((char *)savebuffer, filepath, 0, method, silent);
}
/****************************************************************************
@ -491,7 +491,7 @@ u32 LoadFile(char filepath[], int method, bool silent)
* Write buffer to file
***************************************************************************/
u32
SaveFileBuf (char * buffer, char *filepath, u32 datasize, int method, bool silent)
SaveFile (char * buffer, char *filepath, u32 datasize, int method, bool silent)
{
u32 written = 0;
@ -541,5 +541,5 @@ SaveFileBuf (char * buffer, char *filepath, u32 datasize, int method, bool silen
u32 SaveFile(char filepath[], u32 datasize, int method, bool silent)
{
return SaveFileBuf((char *)savebuffer, filepath, datasize, method, silent);
return SaveFile((char *)savebuffer, filepath, datasize, method, silent);
}

View File

@ -27,10 +27,10 @@ bool ChangeInterface(int method, bool silent);
int ParseDirectory();
void AllocSaveBuffer();
void FreeSaveBuffer();
u32 LoadFileBuf(char * rbuffer, char *filepath, u32 length, int method, bool silent);
u32 LoadFile(char * rbuffer, char *filepath, u32 length, int method, bool silent);
u32 LoadFile(char filepath[], int method, bool silent);
u32 LoadSzFile(char * filepath, unsigned char * rbuffer);
u32 SaveFileBuf(char * buffer, char *filepath, u32 datasize, int method, bool silent);
u32 SaveFile(char * buffer, char *filepath, u32 datasize, int method, bool silent);
u32 SaveFile(char filepath[], u32 datasize, int method, bool silent);
extern unsigned char * savebuffer;

View File

@ -182,7 +182,7 @@ preparePrefsData (int method)
/****************************************************************************
* Decode Preferences Data
****************************************************************************/
static void loadXMLSettingStr(char * var, const char * name, int maxsize)
static void loadXMLSetting(char * var, const char * name, int maxsize)
{
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
if(item)
@ -192,7 +192,7 @@ static void loadXMLSettingStr(char * var, const char * name, int maxsize)
snprintf(var, maxsize, "%s", tmp);
}
}
static void loadXMLSettingInt(int * var, const char * name)
static void loadXMLSetting(int * var, const char * name)
{
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
if(item)
@ -202,7 +202,7 @@ static void loadXMLSettingInt(int * var, const char * name)
*var = atoi(tmp);
}
}
static void loadXMLSettingFloat(float * var, const char * name)
static void loadXMLSetting(float * var, const char * name)
{
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
if(item)
@ -287,36 +287,36 @@ decodePrefsData (int method)
{
// File Settings
loadXMLSettingInt(&GCSettings.AutoLoad, "AutoLoad");
loadXMLSettingInt(&GCSettings.AutoSave, "AutoSave");
loadXMLSettingInt(&GCSettings.LoadMethod, "LoadMethod");
loadXMLSettingInt(&GCSettings.SaveMethod, "SaveMethod");
loadXMLSettingStr(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
loadXMLSettingStr(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
//loadXMLSettingStr(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
loadXMLSettingInt(&GCSettings.VerifySaves, "VerifySaves");
loadXMLSetting(&GCSettings.AutoLoad, "AutoLoad");
loadXMLSetting(&GCSettings.AutoSave, "AutoSave");
loadXMLSetting(&GCSettings.LoadMethod, "LoadMethod");
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
//loadXMLSetting(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
loadXMLSetting(&GCSettings.VerifySaves, "VerifySaves");
// Network Settings
loadXMLSettingStr(GCSettings.smbip, "smbip", sizeof(GCSettings.smbip));
loadXMLSettingStr(GCSettings.smbshare, "smbshare", sizeof(GCSettings.smbshare));
loadXMLSettingStr(GCSettings.smbuser, "smbuser", sizeof(GCSettings.smbuser));
loadXMLSettingStr(GCSettings.smbpwd, "smbpwd", sizeof(GCSettings.smbpwd));
loadXMLSetting(GCSettings.smbip, "smbip", sizeof(GCSettings.smbip));
loadXMLSetting(GCSettings.smbshare, "smbshare", sizeof(GCSettings.smbshare));
loadXMLSetting(GCSettings.smbuser, "smbuser", sizeof(GCSettings.smbuser));
loadXMLSetting(GCSettings.smbpwd, "smbpwd", sizeof(GCSettings.smbpwd));
// Emulation Settings
loadXMLSettingInt(&GCSettings.currpal, "currpal");
loadXMLSettingInt(&GCSettings.timing, "timing");
loadXMLSettingInt(&GCSettings.Zoom, "Zoom");
loadXMLSettingFloat(&GCSettings.ZoomLevel, "ZoomLevel");
loadXMLSettingInt(&GCSettings.render, "render");
loadXMLSettingInt(&GCSettings.widescreen, "widescreen");
loadXMLSettingInt(&GCSettings.hideoverscan, "hideoverscan");
loadXMLSetting(&GCSettings.currpal, "currpal");
loadXMLSetting(&GCSettings.timing, "timing");
loadXMLSetting(&GCSettings.Zoom, "Zoom");
loadXMLSetting(&GCSettings.ZoomLevel, "ZoomLevel");
loadXMLSetting(&GCSettings.render, "render");
loadXMLSetting(&GCSettings.widescreen, "widescreen");
loadXMLSetting(&GCSettings.hideoverscan, "hideoverscan");
// Controller Settings
loadXMLSettingInt(&GCSettings.FourScore, "FSDisable");
loadXMLSettingInt(&GCSettings.zapper, "zapper");
loadXMLSettingInt(&GCSettings.crosshair, "crosshair");
loadXMLSetting(&GCSettings.FourScore, "FSDisable");
loadXMLSetting(&GCSettings.zapper, "zapper");
loadXMLSetting(&GCSettings.crosshair, "crosshair");
loadXMLController(gcpadmap, "gcpadmap");
loadXMLController(wmpadmap, "wmpadmap");