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;
|
int i, j;
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char cfg[255];
|
|
||||||
|
|
||||||
strcpy(cfg, s_strIniPath.c_str());
|
const std::string iniFile(s_strIniPath + "zeropad.ini");
|
||||||
f = fopen(cfg, "w");
|
f = fopen(iniFile.c_str(), "w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("ZeroPAD: failed to save ini %s\n", s_strIniPath.c_str());
|
printf("ZeroPAD: failed to save ini %s\n", s_strIniPath.c_str());
|
||||||
|
@ -67,7 +66,6 @@ void LoadConfig()
|
||||||
{
|
{
|
||||||
FILE *f;
|
FILE *f;
|
||||||
char str[256];
|
char str[256];
|
||||||
char cfg[255];
|
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
memset(&conf, 0, sizeof(conf));
|
memset(&conf, 0, sizeof(conf));
|
||||||
|
@ -87,8 +85,8 @@ void LoadConfig()
|
||||||
conf.keys[0][15] = XK_s; // LEFT
|
conf.keys[0][15] = XK_s; // LEFT
|
||||||
conf.log = 0;
|
conf.log = 0;
|
||||||
|
|
||||||
strcpy(cfg, s_strIniPath.c_str());
|
const std::string iniFile(s_strIniPath + "zeropad.ini");
|
||||||
f = fopen(cfg, "r");
|
f = fopen(iniFile.c_str(), "r");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("ZeroPAD: failed to load ini %s\n", s_strIniPath.c_str());
|
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()
|
void CALLBACK PADconfigure()
|
||||||
{
|
{
|
||||||
char strcurdir[256];
|
|
||||||
getcwd(strcurdir, 256);
|
|
||||||
s_strIniPath = strcurdir;
|
|
||||||
s_strIniPath += "/inis/zeropad.ini";
|
|
||||||
|
|
||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
|
||||||
Conf = create_Conf();
|
Conf = create_Conf();
|
||||||
|
|
|
@ -40,7 +40,7 @@ keyEvent event;
|
||||||
u16 status[2];
|
u16 status[2];
|
||||||
int pressure;
|
int pressure;
|
||||||
static keyEvent s_event;
|
static keyEvent s_event;
|
||||||
string s_strIniPath = "inis/zeropad.ini";
|
string s_strIniPath = "inis";
|
||||||
|
|
||||||
const u32 version = PS2E_PAD_VERSION;
|
const u32 version = PS2E_PAD_VERSION;
|
||||||
const u32 revision = 0;
|
const u32 revision = 0;
|
||||||
|
@ -232,13 +232,6 @@ s32 CALLBACK PADinit(u32 flags)
|
||||||
status[0] = 0xffff;
|
status[0] = 0xffff;
|
||||||
status[1] = 0xffff;
|
status[1] = 0xffff;
|
||||||
|
|
||||||
#ifdef __LINUX__
|
|
||||||
char strcurdir[256];
|
|
||||||
getcwd(strcurdir, 256);
|
|
||||||
s_strIniPath = strcurdir;
|
|
||||||
s_strIniPath += "/inis/zeropad.ini";
|
|
||||||
#endif
|
|
||||||
|
|
||||||
LoadConfig();
|
LoadConfig();
|
||||||
|
|
||||||
PADsetMode(0, 0);
|
PADsetMode(0, 0);
|
||||||
|
@ -275,6 +268,12 @@ s32 CALLBACK PADopen(void *pDsp)
|
||||||
return _PADopen(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()
|
void CALLBACK PADclose()
|
||||||
{
|
{
|
||||||
pthread_spin_destroy(&s_mutexStatus);
|
pthread_spin_destroy(&s_mutexStatus);
|
||||||
|
|
Loading…
Reference in New Issue