Move XInputBase from PadSimple to InputCommon,

Start work on X11 input for wiimote plugin mapping (copy XTra-KrazzY's fix for PadSimple)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3721 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
LPFaint99
2009-07-09 06:50:22 +00:00
parent 19ad53ea58
commit 722ee4cd06
12 changed files with 55 additions and 32 deletions

View File

@ -142,7 +142,7 @@ void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event)
g_Pressed = event.GetKeyCode();
// Handle the keyboard key mapping
std::string StrKey;
char keyStr[64] = {0};
if(ClickedButton != NULL)
{
// Allow the escape key to set a blank key
@ -164,15 +164,17 @@ void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event)
// Use the left and right specific keys instead of the common ones
if (i == VK_SHIFT || i == VK_CONTROL || i == VK_MENU) continue;
// Update the button label
char KeyStr[64] = {0}; strcpy(KeyStr, InputCommon::VKToString(i).c_str());
SetButtonText(ClickedButton->GetId(), KeyStr);
strcpy(keyStr, InputCommon::VKToString(i).c_str());
SetButtonText(ClickedButton->GetId(), keyStr);
// Save the setting
SaveKeyboardMapping(Page, ClickedButton->GetId(), i);
}
}
#elif defined(HAVE_X11) && HAVE_X11
//pad[page].keyForControl[ClickedButton->GetId()] = wxCharCodeWXToX(event.GetKeyCode());
//ClickedButton->SetLabel(wxString::Format(_T("%c"), event.GetKeyCode()));
g_Pressed = InputCommon::wxCharCodeWXToX(g_Pressed);
InputCommon::XKeyToString(g_Pressed, keyStr);
SetButtonText(ClickedButton->GetId(), keyStr);
SaveKeyboardMapping(Page, ClickedButton->GetId(), g_Pressed);
#endif
}
ClickedButton = NULL;