mirror of https://github.com/PCSX2/pcsx2.git
zeropad: patch the ini settings as well.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3055 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
f67299ad83
commit
d7ac8fd81c
|
@ -41,10 +41,9 @@ void SaveConfig()
|
|||
{
|
||||
int i, j;
|
||||
FILE *f;
|
||||
char cfg[255];
|
||||
|
||||
strcpy(cfg, s_strIniPath.c_str());
|
||||
f = fopen(cfg, "w");
|
||||
|
||||
const std::string iniFile(s_strIniPath + "zeropad.ini");
|
||||
f = fopen(iniFile.c_str(), "w");
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("ZeroPAD: failed to save ini %s\n", s_strIniPath.c_str());
|
||||
|
@ -67,7 +66,6 @@ void LoadConfig()
|
|||
{
|
||||
FILE *f;
|
||||
char str[256];
|
||||
char cfg[255];
|
||||
int i, j;
|
||||
|
||||
memset(&conf, 0, sizeof(conf));
|
||||
|
@ -87,8 +85,8 @@ void LoadConfig()
|
|||
conf.keys[0][15] = XK_s; // LEFT
|
||||
conf.log = 0;
|
||||
|
||||
strcpy(cfg, s_strIniPath.c_str());
|
||||
f = fopen(cfg, "r");
|
||||
const std::string iniFile(s_strIniPath + "zeropad.ini");
|
||||
f = fopen(iniFile.c_str(), "r");
|
||||
if (f == NULL)
|
||||
{
|
||||
printf("ZeroPAD: failed to load ini %s\n", s_strIniPath.c_str());
|
||||
|
|
|
@ -369,11 +369,6 @@ void OnConf_Key(GtkButton *button, gpointer user_data)
|
|||
|
||||
void CALLBACK PADconfigure()
|
||||
{
|
||||
char strcurdir[256];
|
||||
getcwd(strcurdir, 256);
|
||||
s_strIniPath = strcurdir;
|
||||
s_strIniPath += "/inis/zeropad.ini";
|
||||
|
||||
LoadConfig();
|
||||
|
||||
Conf = create_Conf();
|
||||
|
|
|
@ -40,7 +40,7 @@ keyEvent event;
|
|||
u16 status[2];
|
||||
int pressure;
|
||||
static keyEvent s_event;
|
||||
string s_strIniPath = "inis/zeropad.ini";
|
||||
string s_strIniPath = "inis";
|
||||
|
||||
const u32 version = PS2E_PAD_VERSION;
|
||||
const u32 revision = 0;
|
||||
|
@ -232,13 +232,6 @@ s32 CALLBACK PADinit(u32 flags)
|
|||
status[0] = 0xffff;
|
||||
status[1] = 0xffff;
|
||||
|
||||
#ifdef __LINUX__
|
||||
char strcurdir[256];
|
||||
getcwd(strcurdir, 256);
|
||||
s_strIniPath = strcurdir;
|
||||
s_strIniPath += "/inis/zeropad.ini";
|
||||
#endif
|
||||
|
||||
LoadConfig();
|
||||
|
||||
PADsetMode(0, 0);
|
||||
|
@ -275,6 +268,12 @@ s32 CALLBACK PADopen(void *pDsp)
|
|||
return _PADopen(pDsp);
|
||||
}
|
||||
|
||||
void CALLBACK PADsetSettingsDir(const char* dir)
|
||||
{
|
||||
// Get the path to the ini directory.
|
||||
s_strIniPath = (dir==NULL) ? "inis/" : dir;
|
||||
}
|
||||
|
||||
void CALLBACK PADclose()
|
||||
{
|
||||
pthread_spin_destroy(&s_mutexStatus);
|
||||
|
|
Loading…
Reference in New Issue