diff --git a/Source/Core/DolphinWX/TASInputDlg.cpp b/Source/Core/DolphinWX/TASInputDlg.cpp index daad36c743..4918663a41 100644 --- a/Source/Core/DolphinWX/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/TASInputDlg.cpp @@ -37,7 +37,6 @@ TASInputDlg::TASInputDlg(wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& position, const wxSize& size, long style) : wxDialog(parent, id, title, position, size, style) { - CreateBaseLayout(); } void TASInputDlg::CreateBaseLayout() @@ -63,6 +62,7 @@ void TASInputDlg::CreateBaseLayout() m_dpad_down = CreateButton("Down"); m_dpad_left = CreateButton("Left"); + m_buttons_dpad = new wxGridSizer(3); m_buttons_dpad->AddSpacer(20); m_buttons_dpad->Add(m_dpad_up.checkbox); m_buttons_dpad->AddSpacer(20); @@ -93,6 +93,8 @@ void TASInputDlg::CreateWiiLayout(int num) if (m_has_layout) return; + CreateBaseLayout(); + m_buttons[6] = &m_one; m_buttons[7] = &m_two; m_buttons[8] = &m_plus; @@ -196,6 +198,8 @@ void TASInputDlg::CreateGCLayout() if (m_has_layout) return; + CreateBaseLayout(); + m_buttons[6] = &m_x; m_buttons[7] = &m_y; m_buttons[8] = &m_z; diff --git a/Source/Core/DolphinWX/TASInputDlg.h b/Source/Core/DolphinWX/TASInputDlg.h index 72ed15f1ca..8f563a2d50 100644 --- a/Source/Core/DolphinWX/TASInputDlg.h +++ b/Source/Core/DolphinWX/TASInputDlg.h @@ -121,5 +121,5 @@ class TASInputDlg : public wxDialog bool m_has_layout = false; - wxGridSizer* const m_buttons_dpad = new wxGridSizer(3); + wxGridSizer* m_buttons_dpad; };