mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 05:09:34 -06:00
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:
@ -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),
|
||||
|
Reference in New Issue
Block a user