Add hotkeys for other mouse buttons and video drivers

This commit is contained in:
dP
2021-01-27 18:58:51 +03:00
parent 688410e6ce
commit 0cde13b1ca
6 changed files with 88 additions and 11 deletions
+16
View File
@@ -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;