From b892d838ffa20ea6c12391a28d458831976140bc Mon Sep 17 00:00:00 2001 From: Rachel Bryk Date: Tue, 25 Jun 2013 10:52:25 -0400 Subject: [PATCH] Allow dragging the analog sticks with the tas input. --- Source/Core/DolphinWX/Src/TASInputDlg.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Source/Core/DolphinWX/Src/TASInputDlg.cpp b/Source/Core/DolphinWX/Src/TASInputDlg.cpp index 0eb2336966..da12f26ff7 100644 --- a/Source/Core/DolphinWX/Src/TASInputDlg.cpp +++ b/Source/Core/DolphinWX/Src/TASInputDlg.cpp @@ -42,6 +42,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, static_bitmap_main = new wxStaticBitmap(this, ID_MAIN_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); static_bitmap_main->Bind(wxEVT_LEFT_UP, &TASInputDlg::OnMouseUpL, this); + static_bitmap_main->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseUpL, this); static_bitmap_main->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_mainX_s = new wxSlider(this, ID_MAIN_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_mainX_s->SetMinSize(wxSize(120,-1)); @@ -68,6 +69,7 @@ TASInputDlg::TASInputDlg(wxWindow *parent, wxWindowID id, const wxString &title, static_bitmap_c = new wxStaticBitmap(this, ID_C_STICK, TASInputDlg::CreateStickBitmap(128,128), wxDefaultPosition, wxDefaultSize); static_bitmap_c->Bind(wxEVT_LEFT_UP, &TASInputDlg::OnMouseUpL, this); + static_bitmap_c->Bind(wxEVT_MOTION, &TASInputDlg::OnMouseUpL, this); static_bitmap_c->Bind(wxEVT_RIGHT_UP, &TASInputDlg::OnMouseUpR, this); wx_cX_s = new wxSlider(this, ID_C_X_SLIDER, 128, 0, 255, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL); wx_cX_s->SetMinSize(wxSize(120,-1)); @@ -754,6 +756,9 @@ void TASInputDlg::OnMouseUpR(wxMouseEvent& event) void TASInputDlg::OnMouseUpL(wxMouseEvent& event) { + if (!event.LeftIsDown()) + return; + wxSlider *sliderX,*sliderY; wxStaticBitmap *sbitmap; wxTextCtrl *textX, *textY;