@@ -85,8 +85,8 @@ const char* GetDriverName()
8585 * @param[in] CallBack DriverCallback für Rückmeldungen.
8686 */
8787VideoWinAPI::VideoWinAPI (VideoDriverLoaderInterface* CallBack)
88- : VideoDriver(CallBack), mouse_l( false ), mouse_r( false ), mouse_z(0 ), screen(nullptr ), screen_dc(nullptr ),
89- screen_rc( nullptr ), isWindowResizable(false ), isMinimized(true )
88+ : VideoDriver(CallBack), mouse_z(0 ), screen(nullptr ), screen_dc( nullptr ), screen_rc (nullptr ),
89+ isWindowResizable(false ), isMinimized(true )
9090{
9191 pVideoWinAPI = this ;
9292}
@@ -665,25 +665,29 @@ LRESULT CALLBACK VideoWinAPI::WindowProc(HWND window, UINT msg, WPARAM wParam, L
665665 pVideoWinAPI->CallBack ->Msg_MouseMove (pVideoWinAPI->mouse_xy );
666666 break ;
667667 case WM_LBUTTONDOWN:
668- pVideoWinAPI->mouse_l = true ;
669668 pVideoWinAPI->mouse_xy .ldown = true ;
670669 pVideoWinAPI->CallBack ->Msg_LeftDown (pVideoWinAPI->mouse_xy );
671670 break ;
672671 case WM_LBUTTONUP:
673- pVideoWinAPI->mouse_l = false ;
674672 pVideoWinAPI->mouse_xy .ldown = false ;
675673 pVideoWinAPI->CallBack ->Msg_LeftUp (pVideoWinAPI->mouse_xy );
676674 break ;
677675 case WM_RBUTTONDOWN:
678- pVideoWinAPI->mouse_r = true ;
679676 pVideoWinAPI->mouse_xy .rdown = true ;
680677 pVideoWinAPI->CallBack ->Msg_RightDown (pVideoWinAPI->mouse_xy );
681678 break ;
682679 case WM_RBUTTONUP:
683- pVideoWinAPI->mouse_r = false ;
684680 pVideoWinAPI->mouse_xy .rdown = false ;
685681 pVideoWinAPI->CallBack ->Msg_RightUp (pVideoWinAPI->mouse_xy );
686682 break ;
683+ case WM_MBUTTONDOWN:
684+ pVideoWinAPI->mouse_xy .mdown = true ;
685+ pVideoWinAPI->CallBack ->Msg_MiddleDown (pVideoWinAPI->mouse_xy );
686+ break ;
687+ case WM_MBUTTONUP:
688+ pVideoWinAPI->mouse_xy .mdown = false ;
689+ pVideoWinAPI->CallBack ->Msg_MiddleUp (pVideoWinAPI->mouse_xy );
690+ break ;
687691 case WM_MOUSEWHEEL:
688692 // Obtain scrolling distance. For every multiple of WHEEL_DELTA, we have to fire an event, because we treat
689693 // the wheel like two buttons. One wheel "step" usually produces a mouse_z of +/- WHEEL_DELTA. But there
0 commit comments