Fixes Issue 2180

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4981 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
ayuanx 2010-01-29 03:11:29 +00:00
parent 9a49e91e41
commit f9dd509459
2 changed files with 5 additions and 4 deletions

View File

@ -100,6 +100,7 @@ GCPadConfigDialog::GCPadConfigDialog(wxWindow *parent, wxWindowID id, const wxSt
// Reset values // Reset values
g_Pressed = 0; g_Pressed = 0;
ClickedButton = NULL;
GetButtonWaitingID = 0; GetButtonWaitingID = 0;
GetButtonWaitingTimer = 0; GetButtonWaitingTimer = 0;
@ -186,7 +187,7 @@ void GCPadConfigDialog::SaveButtonMapping(int Id, int Key)
void GCPadConfigDialog::OnKeyDown(wxKeyEvent& event) void GCPadConfigDialog::OnKeyDown(wxKeyEvent& event)
{ {
event.Skip(); //event.Skip();
if(ClickedButton != NULL) if(ClickedButton != NULL)
{ {

View File

@ -117,9 +117,7 @@ WiimotePadConfigDialog::WiimotePadConfigDialog(wxWindow *parent, wxWindowID id,
: wxDialog(parent, id, title, position, size, style) : wxDialog(parent, id, title, position, size, style)
{ {
m_ControlsCreated = false;; m_ControlsCreated = false;;
m_Page = g_Config.CurrentPage;
CreatePadGUIControls(); CreatePadGUIControls();
m_Notebook->ChangeSelection(m_Page);
#if wxUSE_TIMER #if wxUSE_TIMER
m_ButtonMappingTimer = new wxTimer(this, IDTM_BUTTON); m_ButtonMappingTimer = new wxTimer(this, IDTM_BUTTON);
@ -139,6 +137,8 @@ WiimotePadConfigDialog::WiimotePadConfigDialog(wxWindow *parent, wxWindowID id,
} }
#endif #endif
m_Page = g_Config.CurrentPage;
m_Notebook->ChangeSelection(m_Page);
// Set control values // Set control values
UpdateGUI(); UpdateGUI();
@ -211,7 +211,7 @@ void WiimotePadConfigDialog::SaveButtonMapping(int Id, int Key)
void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event) void WiimotePadConfigDialog::OnKeyDown(wxKeyEvent& event)
{ {
event.Skip(); //event.Skip();
if(ClickedButton != NULL) if(ClickedButton != NULL)
{ {