1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 03:28:20 +02:00

Fixed issue with forward/backward mouse buttons

This commit is contained in:
Brian Fiete 2020-09-09 23:29:36 -07:00
parent e70394bbf6
commit 0b7edafd73
2 changed files with 7 additions and 1 deletions

View file

@ -80,7 +80,7 @@ public:
class BFSysBitmap;
#define KEYCODE_MAX 0x100
#define MOUSEBUTTON_MAX 3
#define MOUSEBUTTON_MAX 5
class BFWindow;

View file

@ -571,6 +571,9 @@ LRESULT WinBFWindow::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
auto _BtnDown = [&](int btn)
{
BF_ASSERT(btn < MOUSEBUTTON_MAX);
if (btn >= MOUSEBUTTON_MAX)
return;
DWORD tickNow = BFTickCount();
SetCapture(hWnd);
@ -587,6 +590,9 @@ LRESULT WinBFWindow::WindowProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
auto _BtnUp = [&](int btn)
{
BF_ASSERT(btn < MOUSEBUTTON_MAX);
if (btn >= MOUSEBUTTON_MAX)
return;
releaseCapture = true;
mIsMouseDown[btn] = false;
mMouseUpFunc(this, x, y, btn);