From 94b822df3b83d672363145a1c3ab8f0c00ea3b2c Mon Sep 17 00:00:00 2001 From: Christian Kenny Date: Tue, 23 Jan 2018 01:07:00 -0500 Subject: [PATCH] Resolve cases where GUI values are not updated when adjusting sliders with the scroll wheel. --- plugins/spu2-x/src/SndOut_Portaudio.cpp | 5 +++-- plugins/spu2-x/src/Windows/Config.cpp | 8 +++----- plugins/spu2-x/src/Windows/SndOut_DSound.cpp | 5 +++-- plugins/spu2-x/src/Windows/SndOut_waveOut.cpp | 5 +++-- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/plugins/spu2-x/src/SndOut_Portaudio.cpp b/plugins/spu2-x/src/SndOut_Portaudio.cpp index 0f8f0ef561..c279266386 100644 --- a/plugins/spu2-x/src/SndOut_Portaudio.cpp +++ b/plugins/spu2-x/src/SndOut_Portaudio.cpp @@ -462,13 +462,14 @@ private: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); switch (wmId) { - //case TB_ENDTRACK: - //case TB_THUMBPOSITION: case TB_LINEUP: case TB_LINEDOWN: case TB_PAGEUP: case TB_PAGEDOWN: + case TB_TOP: + case TB_BOTTOM: wmEvent = (int)SendMessage((HWND)lParam, TBM_GETPOS, 0, 0); + case TB_THUMBPOSITION: case TB_THUMBTRACK: { wchar_t temp[128]; if (wmEvent < 10) diff --git a/plugins/spu2-x/src/Windows/Config.cpp b/plugins/spu2-x/src/Windows/Config.cpp index d2e3895898..29727d4456 100644 --- a/plugins/spu2-x/src/Windows/Config.cpp +++ b/plugins/spu2-x/src/Windows/Config.cpp @@ -374,20 +374,18 @@ BOOL CALLBACK ConfigProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) wmEvent = LOWORD(wParam); HWND hwndDlg = (HWND)lParam; - // TB_THUMBTRACK passes the curpos in wParam. Other messages - // have to use TBM_GETPOS, so they will override this assignment (see below) - int curpos = HIWORD(wParam); switch (wmEvent) { - //case TB_ENDTRACK: - //case TB_THUMBPOSITION: case TB_LINEUP: case TB_LINEDOWN: case TB_PAGEUP: case TB_PAGEDOWN: + case TB_TOP: + case TB_BOTTOM: curpos = (int)SendMessage(hwndDlg, TBM_GETPOS, 0, 0); + case TB_THUMBPOSITION: case TB_THUMBTRACK: Clampify(curpos, (int)SendMessage(hwndDlg, TBM_GETRANGEMIN, 0, 0), diff --git a/plugins/spu2-x/src/Windows/SndOut_DSound.cpp b/plugins/spu2-x/src/Windows/SndOut_DSound.cpp index 74839a6e9b..a5b9f22a9c 100644 --- a/plugins/spu2-x/src/Windows/SndOut_DSound.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_DSound.cpp @@ -346,13 +346,14 @@ private: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); switch (wmId) { - //case TB_ENDTRACK: - //case TB_THUMBPOSITION: case TB_LINEUP: case TB_LINEDOWN: case TB_PAGEUP: case TB_PAGEDOWN: + case TB_TOP: + case TB_BOTTOM: wmEvent = (int)SendMessage((HWND)lParam, TBM_GETPOS, 0, 0); + case TB_THUMBPOSITION: case TB_THUMBTRACK: { wchar_t temp[128]; if (wmEvent < 2) diff --git a/plugins/spu2-x/src/Windows/SndOut_waveOut.cpp b/plugins/spu2-x/src/Windows/SndOut_waveOut.cpp index 3378ffa85f..b4095a7262 100644 --- a/plugins/spu2-x/src/Windows/SndOut_waveOut.cpp +++ b/plugins/spu2-x/src/Windows/SndOut_waveOut.cpp @@ -239,13 +239,14 @@ private: wmId = LOWORD(wParam); wmEvent = HIWORD(wParam); switch (wmId) { - //case TB_ENDTRACK: - //case TB_THUMBPOSITION: case TB_LINEUP: case TB_LINEDOWN: case TB_PAGEUP: case TB_PAGEDOWN: + case TB_TOP: + case TB_BOTTOM: wmEvent = (int)SendMessage((HWND)lParam, TBM_GETPOS, 0, 0); + case TB_THUMBPOSITION: case TB_THUMBTRACK: if (wmEvent < 3) wmEvent = 3;