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:
gregory.hainaut@gmail.com 2011-05-14 20:03:29 +00:00
parent 8702685f73
commit 372155ad05
4 changed files with 3 additions and 4 deletions

View File

@ -370,7 +370,7 @@ void joy_changed(GtkComboBox *box, gpointer user_data)
// unassign every joystick with this pad
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);

View File

@ -120,7 +120,7 @@ void SaveConfig()
f = fopen(iniFile.c_str(), "w");
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;
}

View File

@ -93,5 +93,5 @@ __forceinline int key_to_pov_sign(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);
}

View File

@ -25,7 +25,6 @@
// Joystick definitions //
//////////////////////////
int s_selectedpad = 0;
vector<JoystickInfo*> s_vjoysticks;
static u32 s_bSDLInit = false;