Add hotkeys for other mouse buttons and video drivers
This commit is contained in:
@@ -715,6 +715,22 @@ static LRESULT CALLBACK WndProcGdi(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
|
||||
HandleMouseEvents();
|
||||
return 0;
|
||||
|
||||
/* CityMania code start */
|
||||
case WM_MBUTTONUP:
|
||||
ReleaseCapture();
|
||||
HandleKeypress(CM_WKC_MOUSE_MIDDLE);
|
||||
return 0;
|
||||
|
||||
case WM_XBUTTONUP: {
|
||||
ReleaseCapture();
|
||||
int button = CM_WKC_MOUSE_OTHER_START + ev.button.button - 1;
|
||||
if (button >= CM_WKC_MOUSE_OTHER_START && button < CM_WKC_MOUSE_OTHER_END) {
|
||||
HandleKeypress(button, 0);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
/* CityMania code end */
|
||||
|
||||
case WM_MOUSELEAVE:
|
||||
UndrawMouseCursor();
|
||||
_cursor.in_window = false;
|
||||
|
||||
Reference in New Issue
Block a user