mirror of https://github.com/PCSX2/pcsx2.git
onepad: Fix 2 bugs that renders hat unusable. Impact multi pad too (not tested this part).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@4651 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
8702685f73
commit
372155ad05
|
@ -370,7 +370,7 @@ void joy_changed(GtkComboBox *box, gpointer user_data)
|
||||||
// unassign every joystick with this pad
|
// unassign every joystick with this pad
|
||||||
for (int i = 0; i < (int)s_vjoysticks.size(); ++i)
|
for (int i = 0; i < (int)s_vjoysticks.size(); ++i)
|
||||||
{
|
{
|
||||||
if (s_vjoysticks[i]->GetPAD() == s_selectedpad) s_vjoysticks[i]->Assign(-1);
|
if (s_vjoysticks[i]->GetPAD() == current_pad) s_vjoysticks[i]->Assign(-1);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (joyid >= 0 && joyid < (int)s_vjoysticks.size()) s_vjoysticks[joyid]->Assign(current_pad);
|
if (joyid >= 0 && joyid < (int)s_vjoysticks.size()) s_vjoysticks[joyid]->Assign(current_pad);
|
||||||
|
|
|
@ -120,7 +120,7 @@ void SaveConfig()
|
||||||
f = fopen(iniFile.c_str(), "w");
|
f = fopen(iniFile.c_str(), "w");
|
||||||
if (f == NULL)
|
if (f == NULL)
|
||||||
{
|
{
|
||||||
printf("ZeroPAD: failed to save ini %s\n", iniFile.c_str());
|
printf("OnePAD: failed to save ini %s\n", iniFile.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -93,5 +93,5 @@ __forceinline int key_to_pov_sign(int pad, int index)
|
||||||
|
|
||||||
__forceinline int key_to_hat_dir(int pad, int index)
|
__forceinline int key_to_hat_dir(int pad, int index)
|
||||||
{
|
{
|
||||||
return (((conf.keys[pad][index]) & ~ 0x40000) >> 8);
|
return (((conf.keys[pad][index]) & 0xF00) >> 8);
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,7 +25,6 @@
|
||||||
// Joystick definitions //
|
// Joystick definitions //
|
||||||
//////////////////////////
|
//////////////////////////
|
||||||
|
|
||||||
int s_selectedpad = 0;
|
|
||||||
vector<JoystickInfo*> s_vjoysticks;
|
vector<JoystickInfo*> s_vjoysticks;
|
||||||
static u32 s_bSDLInit = false;
|
static u32 s_bSDLInit = false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue