Various issue fixes for PadSimple. Numpad support in DInput
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@695 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
53b4dda6c7
commit
6ca082489a
|
@ -65,6 +65,39 @@ void DInput::DIKToString(unsigned int keycode, char *keyStr)
|
||||||
case DIK_PGDN:
|
case DIK_PGDN:
|
||||||
strcpy(keyStr, "PgDn");
|
strcpy(keyStr, "PgDn");
|
||||||
break;
|
break;
|
||||||
|
case DIK_NUMPAD0:
|
||||||
|
strcpy(keyStr, "Num 0");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD1:
|
||||||
|
strcpy(keyStr, "Num 1");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD2:
|
||||||
|
strcpy(keyStr, "Num 2");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD3:
|
||||||
|
strcpy(keyStr, "Num 3");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD4:
|
||||||
|
strcpy(keyStr, "Num 4");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD5:
|
||||||
|
strcpy(keyStr, "Num 5");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD6:
|
||||||
|
strcpy(keyStr, "Num 6");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD7:
|
||||||
|
strcpy(keyStr, "Num 7");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD8:
|
||||||
|
strcpy(keyStr, "Num 8");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPAD9:
|
||||||
|
strcpy(keyStr, "Num 9");
|
||||||
|
break;
|
||||||
|
case DIK_NUMPADSLASH:
|
||||||
|
strcpy(keyStr, "Num /");
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
GetKeyNameText(keycode << 16, keyStr, 64);
|
GetKeyNameText(keycode << 16, keyStr, 64);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -135,7 +135,7 @@ void ConfigDialog::CreateGUIControls()
|
||||||
sDeviceBottom[i] = new wxBoxSizer(wxHORIZONTAL);
|
sDeviceBottom[i] = new wxBoxSizer(wxHORIZONTAL);
|
||||||
m_DeviceName[i] = new wxChoice(m_Controller[i], ID_DEVICENAME, wxDefaultPosition, wxDefaultSize, arrayStringFor_DeviceName, 0, wxDefaultValidator);
|
m_DeviceName[i] = new wxChoice(m_Controller[i], ID_DEVICENAME, wxDefaultPosition, wxDefaultSize, arrayStringFor_DeviceName, 0, wxDefaultValidator);
|
||||||
m_Attached[i] = new wxCheckBox(m_Controller[i], ID_ATTACHED, wxT("Controller attached"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Attached[i] = new wxCheckBox(m_Controller[i], ID_ATTACHED, wxT("Controller attached"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Disable[i] = new wxCheckBox(m_Controller[i], ID_DISABLE, wxT("Disable when dolphin isn't in foreground"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Disable[i] = new wxCheckBox(m_Controller[i], ID_DISABLE, wxT("Disable when Dolphin is not in focus"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Rumble[i] = new wxCheckBox(m_Controller[i], ID_RUMBLE, wxT("Enable rumble"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
m_Rumble[i] = new wxCheckBox(m_Controller[i], ID_RUMBLE, wxT("Enable rumble"), wxDefaultPosition, wxDefaultSize, 0, wxDefaultValidator);
|
||||||
m_Attached[i]->SetValue(pad[i].attached);
|
m_Attached[i]->SetValue(pad[i].attached);
|
||||||
m_Disable[i]->SetValue(pad[i].disable);
|
m_Disable[i]->SetValue(pad[i].disable);
|
||||||
|
@ -231,6 +231,7 @@ void ConfigDialog::OnKeyDown(wxKeyEvent& event)
|
||||||
pad[page].keyForControl[clickedButton->GetId()] = i;
|
pad[page].keyForControl[clickedButton->GetId()] = i;
|
||||||
DInput::DIKToString(i, keyStr);
|
DInput::DIKToString(i, keyStr);
|
||||||
clickedButton->SetLabel(wxString::FromAscii(keyStr));
|
clickedButton->SetLabel(wxString::FromAscii(keyStr));
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -682,7 +682,11 @@ void LoadConfig()
|
||||||
for (int x = 0; x < NUMCONTROLS; x++)
|
for (int x = 0; x < NUMCONTROLS; x++)
|
||||||
{
|
{
|
||||||
file.Get(SectionName, controlNames[x], &pad[i].keyForControl[x], defaultKeyForControl[x]);
|
file.Get(SectionName, controlNames[x], &pad[i].keyForControl[x], defaultKeyForControl[x]);
|
||||||
|
#ifndef _WIN32
|
||||||
|
// In linux we have a problem assigning the upper case of the
|
||||||
|
// keys because they're not being recognized
|
||||||
pad[i].keyForControl[x] = tolower(pad[i].keyForControl[x]);
|
pad[i].keyForControl[x] = tolower(pad[i].keyForControl[x]);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue