diff --git a/deps/libui/win32/areascroll.cpp b/deps/libui/win32/areascroll.cpp index f18d0ad874..1797063a9d 100644 --- a/deps/libui/win32/areascroll.cpp +++ b/deps/libui/win32/areascroll.cpp @@ -100,11 +100,10 @@ static void scroll(uiArea *a, int which, struct scrollParams *p, WPARAM wParam, static void wheelscroll(uiArea *a, int which, struct scrollParams *p, WPARAM wParam, LPARAM lParam) { - int delta; int lines; UINT scrollAmount; + int delta = GET_WHEEL_DELTA_WPARAM(wParam); - delta = GET_WHEEL_DELTA_WPARAM(wParam); if (SystemParametersInfoW(p->wheelSPIAction, 0, &scrollAmount, 0) == 0) // TODO use scrollAmount == 3 (for both v and h) instead? logLastError(L"error getting area wheel scroll amount");