mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 21:35:28 +00: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
|
#endif
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PADConfigDialogSimple,wxDialog)
|
BEGIN_EVENT_TABLE(PADConfigDialogSimple,wxDialog)
|
||||||
|
EVT_SHOW(PADConfigDialogSimple::OnShow)
|
||||||
EVT_CLOSE(PADConfigDialogSimple::OnClose)
|
EVT_CLOSE(PADConfigDialogSimple::OnClose)
|
||||||
EVT_BUTTON(ID_CLOSE,PADConfigDialogSimple::OnCloseClick)
|
EVT_BUTTON(ID_CLOSE,PADConfigDialogSimple::OnCloseClick)
|
||||||
EVT_BUTTON(ID_PAD_ABOUT,PADConfigDialogSimple::DllAbout)
|
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)
|
PADConfigDialogSimple::PADConfigDialogSimple(wxWindow *parent, wxWindowID id, const wxString &title, const wxPoint &position, const wxSize& size, long style)
|
||||||
: wxDialog(parent, id, title, position, size, style)
|
: wxDialog(parent, id, title, position, size, style)
|
||||||
{
|
{
|
||||||
#ifdef _WIN32
|
|
||||||
m_dinput.Init((HWND)parent);
|
|
||||||
#endif
|
|
||||||
ClickedButton = NULL;
|
ClickedButton = NULL;
|
||||||
CreateGUIControls();
|
CreateGUIControls();
|
||||||
Fit();
|
Fit();
|
||||||
@ -86,8 +84,6 @@ PADConfigDialogSimple::~PADConfigDialogSimple()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// Create input button controls
|
// Create input button controls
|
||||||
// -------------------
|
// -------------------
|
||||||
inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer,
|
inline void AddControl(wxPanel *pan, wxButton **button, wxStaticBoxSizer *sizer,
|
||||||
@ -328,6 +324,13 @@ void PADConfigDialogSimple::OnClose(wxCloseEvent& event)
|
|||||||
EndModal(0);
|
EndModal(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PADConfigDialogSimple::OnShow(wxShowEvent& event)
|
||||||
|
{
|
||||||
|
#ifdef _WIN32
|
||||||
|
m_dinput.Init((HWND)this->GetParent());
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
void PADConfigDialogSimple::OnKeyDown(wxKeyEvent& event)
|
void PADConfigDialogSimple::OnKeyDown(wxKeyEvent& event)
|
||||||
{
|
{
|
||||||
char keyStr[10] = {0};
|
char keyStr[10] = {0};
|
||||||
|
@ -125,7 +125,8 @@ class PADConfigDialogSimple : public wxDialog
|
|||||||
void ControllerSettingsChanged(wxCommandEvent& event);
|
void ControllerSettingsChanged(wxCommandEvent& event);
|
||||||
void OnButtonClick(wxCommandEvent& event);
|
void OnButtonClick(wxCommandEvent& event);
|
||||||
void DllAbout(wxCommandEvent& event);
|
void DllAbout(wxCommandEvent& event);
|
||||||
|
void OnShow(wxShowEvent& event);
|
||||||
|
|
||||||
int keyPress;
|
int keyPress;
|
||||||
wxButton *ClickedButton;
|
wxButton *ClickedButton;
|
||||||
wxString oldLabel;
|
wxString oldLabel;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user