linux port of simplepad dialog

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@683 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
nakeee
2008-09-25 09:15:34 +00:00
parent df27789fe9
commit 6d872a6be5
4 changed files with 31 additions and 27 deletions

View File

@ -82,7 +82,7 @@ inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer,
#ifdef _WIN32
DInput::DIKToString(pad[controller].keyForControl[ctl], keyStr);
#else
sprintf(keyStr, "%c", pad[controller].keyForControl[ctl]);
XKeyToString(pad[controller].keyForControl[ctl], keyStr);
#endif
*button = new wxButton(pan, ctl, wxString::FromAscii(keyStr),
@ -230,7 +230,7 @@ void ConfigDialog::OnKeyDown(wxKeyEvent& event)
}
}
#else
pad[page].keyForControl[clickedButton->GetId()] = event.GetKeyCode();
pad[page].keyForControl[clickedButton->GetId()] = wxCharCodeWXToX(event.GetKeyCode());
#endif
clickedButton->SetLabel(wxString::Format(_T("%c"), event.GetKeyCode()));
clickedButton->Disconnect();
@ -270,7 +270,7 @@ void ConfigDialog::OnButtonClick(wxCommandEvent& event)
}
clickedButton = (wxButton *)event.GetEventObject();
oldLabel = clickedButton->GetLabel();
clickedButton->SetLabel(wxString::FromAscii("Press Key"));
clickedButton->SetLabel(_("Press Key"));
clickedButton->Connect(wxID_ANY, wxEVT_KEY_DOWN,
wxKeyEventHandler(ConfigDialog::OnKeyDown),