mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-15 05:47:56 -07:00
PadSimple: move DInput init to new function OnShow (called every time dialog is shown instead of just once in the constructor)
fixes issue 1341. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4291 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
8beeaff896
commit
dbf68d9b0d
@ -27,6 +27,7 @@ DInput m_dinput;
|
||||
#endif
|
||||
|
||||
BEGIN_EVENT_TABLE(PADConfigDialogSimple,wxDialog)
|
||||
EVT_SHOW(PADConfigDialogSimple::OnShow)
|
||||
EVT_CLOSE(PADConfigDialogSimple::OnClose)
|
||||
EVT_BUTTON(ID_CLOSE,PADConfigDialogSimple::OnCloseClick)
|
||||
EVT_BUTTON(ID_PAD_ABOUT,PADConfigDialogSimple::DllAbout)
|
||||
@ -69,9 +70,6 @@ END_EVENT_TABLE()
|
||||
PADConfigDialogSimple::PADConfigDialogSimple(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||
: wxDialog(parent, id, title, position, size, style)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
m_dinput.Init((HWND)parent);
|
||||
#endif
|
||||
ClickedButton = NULL;
|
||||
CreateGUIControls();
|
||||
Fit();
|
||||
@ -86,8 +84,6 @@ PADConfigDialogSimple::~PADConfigDialogSimple()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
|
||||
// Create input button controls
|
||||
// -------------------
|
||||
inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer,
|
||||
@ -328,6 +324,13 @@ void PADConfigDialogSimple::OnClose(wxCloseEvent& event)
|
||||
EndModal(0);
|
||||
}
|
||||
|
||||
void PADConfigDialogSimple::OnShow(wxShowEvent& event)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
m_dinput.Init((HWND)this->GetParent());
|
||||
#endif
|
||||
}
|
||||
|
||||
void PADConfigDialogSimple::OnKeyDown(wxKeyEvent& event)
|
||||
{
|
||||
char keyStr[10] = {0};
|
||||
|
@ -125,7 +125,8 @@ class PADConfigDialogSimple : public wxDialog
|
||||
void ControllerSettingsChanged(wxCommandEvent& event);
|
||||
void OnButtonClick(wxCommandEvent& event);
|
||||
void DllAbout(wxCommandEvent& event);
|
||||
|
||||
void OnShow(wxShowEvent& event);
|
||||
|
||||
int keyPress;
|
||||
wxButton *ClickedButton;
|
||||
wxString oldLabel;
|
||||
|
Loading…
Reference in New Issue
Block a user