mirror of
https://github.com/dborth/fceugx.git
synced 2025-01-07 14:28:18 +01:00
sync up to other code bases
This commit is contained in:
parent
7a84a2492e
commit
07099ba282
@ -545,8 +545,7 @@ void SetDVDdirectory(u64 dir, int length)
|
|||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
static int DirectorySearch(char dir[512])
|
static int DirectorySearch(char dir[512])
|
||||||
{
|
{
|
||||||
int i;
|
for (int i = 0; i < browser.numEntries; i++ )
|
||||||
for (i = 0; i < browser.numEntries; i++ )
|
|
||||||
if (strcmp(browserList[i].filename, dir) == 0)
|
if (strcmp(browserList[i].filename, dir) == 0)
|
||||||
return i;
|
return i;
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -121,7 +121,7 @@ int GCMemROM(int method, int size)
|
|||||||
|
|
||||||
if(MakeFilePath(filepath, FILE_FDSBIOS, method))
|
if(MakeFilePath(filepath, FILE_FDSBIOS, method))
|
||||||
{
|
{
|
||||||
biosSize = LoadFileBuf (tmpbuffer, filepath, 0, method, SILENT);
|
biosSize = LoadFile (tmpbuffer, filepath, 0, method, SILENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(biosSize == 8192)
|
if(biosSize == 8192)
|
||||||
|
@ -393,7 +393,7 @@ LoadSzFile(char * filepath, unsigned char * rbuffer)
|
|||||||
* LoadFile
|
* LoadFile
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
u32
|
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];
|
char zipbuffer[2048];
|
||||||
u32 size = 0;
|
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)
|
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
|
* Write buffer to file
|
||||||
***************************************************************************/
|
***************************************************************************/
|
||||||
u32
|
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;
|
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)
|
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);
|
||||||
}
|
}
|
||||||
|
@ -27,10 +27,10 @@ bool ChangeInterface(int method, bool silent);
|
|||||||
int ParseDirectory();
|
int ParseDirectory();
|
||||||
void AllocSaveBuffer();
|
void AllocSaveBuffer();
|
||||||
void FreeSaveBuffer();
|
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 LoadFile(char filepath[], int method, bool silent);
|
||||||
u32 LoadSzFile(char * filepath, unsigned char * rbuffer);
|
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);
|
u32 SaveFile(char filepath[], u32 datasize, int method, bool silent);
|
||||||
|
|
||||||
extern unsigned char * savebuffer;
|
extern unsigned char * savebuffer;
|
||||||
|
@ -182,7 +182,7 @@ preparePrefsData (int method)
|
|||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Decode Preferences Data
|
* 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);
|
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
|
||||||
if(item)
|
if(item)
|
||||||
@ -192,7 +192,7 @@ static void loadXMLSettingStr(char * var, const char * name, int maxsize)
|
|||||||
snprintf(var, maxsize, "%s", tmp);
|
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);
|
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
|
||||||
if(item)
|
if(item)
|
||||||
@ -202,7 +202,7 @@ static void loadXMLSettingInt(int * var, const char * name)
|
|||||||
*var = atoi(tmp);
|
*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);
|
item = mxmlFindElement(xml, xml, "setting", "name", name, MXML_DESCEND);
|
||||||
if(item)
|
if(item)
|
||||||
@ -287,36 +287,36 @@ decodePrefsData (int method)
|
|||||||
{
|
{
|
||||||
// File Settings
|
// File Settings
|
||||||
|
|
||||||
loadXMLSettingInt(&GCSettings.AutoLoad, "AutoLoad");
|
loadXMLSetting(&GCSettings.AutoLoad, "AutoLoad");
|
||||||
loadXMLSettingInt(&GCSettings.AutoSave, "AutoSave");
|
loadXMLSetting(&GCSettings.AutoSave, "AutoSave");
|
||||||
loadXMLSettingInt(&GCSettings.LoadMethod, "LoadMethod");
|
loadXMLSetting(&GCSettings.LoadMethod, "LoadMethod");
|
||||||
loadXMLSettingInt(&GCSettings.SaveMethod, "SaveMethod");
|
loadXMLSetting(&GCSettings.SaveMethod, "SaveMethod");
|
||||||
loadXMLSettingStr(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
|
loadXMLSetting(GCSettings.LoadFolder, "LoadFolder", sizeof(GCSettings.LoadFolder));
|
||||||
loadXMLSettingStr(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
|
loadXMLSetting(GCSettings.SaveFolder, "SaveFolder", sizeof(GCSettings.SaveFolder));
|
||||||
//loadXMLSettingStr(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
|
//loadXMLSetting(GCSettings.CheatFolder, "CheatFolder", sizeof(GCSettings.CheatFolder));
|
||||||
loadXMLSettingInt(&GCSettings.VerifySaves, "VerifySaves");
|
loadXMLSetting(&GCSettings.VerifySaves, "VerifySaves");
|
||||||
|
|
||||||
// Network Settings
|
// Network Settings
|
||||||
|
|
||||||
loadXMLSettingStr(GCSettings.smbip, "smbip", sizeof(GCSettings.smbip));
|
loadXMLSetting(GCSettings.smbip, "smbip", sizeof(GCSettings.smbip));
|
||||||
loadXMLSettingStr(GCSettings.smbshare, "smbshare", sizeof(GCSettings.smbshare));
|
loadXMLSetting(GCSettings.smbshare, "smbshare", sizeof(GCSettings.smbshare));
|
||||||
loadXMLSettingStr(GCSettings.smbuser, "smbuser", sizeof(GCSettings.smbuser));
|
loadXMLSetting(GCSettings.smbuser, "smbuser", sizeof(GCSettings.smbuser));
|
||||||
loadXMLSettingStr(GCSettings.smbpwd, "smbpwd", sizeof(GCSettings.smbpwd));
|
loadXMLSetting(GCSettings.smbpwd, "smbpwd", sizeof(GCSettings.smbpwd));
|
||||||
|
|
||||||
// Emulation Settings
|
// Emulation Settings
|
||||||
|
|
||||||
loadXMLSettingInt(&GCSettings.currpal, "currpal");
|
loadXMLSetting(&GCSettings.currpal, "currpal");
|
||||||
loadXMLSettingInt(&GCSettings.timing, "timing");
|
loadXMLSetting(&GCSettings.timing, "timing");
|
||||||
loadXMLSettingInt(&GCSettings.Zoom, "Zoom");
|
loadXMLSetting(&GCSettings.Zoom, "Zoom");
|
||||||
loadXMLSettingFloat(&GCSettings.ZoomLevel, "ZoomLevel");
|
loadXMLSetting(&GCSettings.ZoomLevel, "ZoomLevel");
|
||||||
loadXMLSettingInt(&GCSettings.render, "render");
|
loadXMLSetting(&GCSettings.render, "render");
|
||||||
loadXMLSettingInt(&GCSettings.widescreen, "widescreen");
|
loadXMLSetting(&GCSettings.widescreen, "widescreen");
|
||||||
loadXMLSettingInt(&GCSettings.hideoverscan, "hideoverscan");
|
loadXMLSetting(&GCSettings.hideoverscan, "hideoverscan");
|
||||||
|
|
||||||
// Controller Settings
|
// Controller Settings
|
||||||
loadXMLSettingInt(&GCSettings.FourScore, "FSDisable");
|
loadXMLSetting(&GCSettings.FourScore, "FSDisable");
|
||||||
loadXMLSettingInt(&GCSettings.zapper, "zapper");
|
loadXMLSetting(&GCSettings.zapper, "zapper");
|
||||||
loadXMLSettingInt(&GCSettings.crosshair, "crosshair");
|
loadXMLSetting(&GCSettings.crosshair, "crosshair");
|
||||||
|
|
||||||
loadXMLController(gcpadmap, "gcpadmap");
|
loadXMLController(gcpadmap, "gcpadmap");
|
||||||
loadXMLController(wmpadmap, "wmpadmap");
|
loadXMLController(wmpadmap, "wmpadmap");
|
||||||
|
Loading…
Reference in New Issue
Block a user