-
Notifications
You must be signed in to change notification settings - Fork 300
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mouse control problem with Remote Desktop Connection (windows) #131
Comments
Hi @rodionstepanov, thanks for reporting this. It's the age-old poor design choice of Microsoft's However, in another poor design choice by Microsoft, when the remote screen resolution is different and/or off-set compared to the client screen resolution, I have now changed the mouse input routine on Windows to avoid Kind regards, |
I'm sorry but it does not resolve the bug. I've test with setup for 3D Taylor-Green vortices; Looks like sensitivity is very high. |
@rodionstepanov can you try if reducing the |
@ProjectPhysX I took |
I'm probably telling you something you already know here but you just turn off mouse-input with the "u" key and alt-tab in/out of the program where required to avoid clicking the app window and re-enabling the mouse. I do a lot of remote desktop stuff to the workstation and just turn down the multipliers for I/J/K/L keys, using the mouse is a write-off on remote sessions for me. |
Hi @rodionstepanov and @SLGY, I think the root cause here is that the Windows Remote Desktop client fails to execute the I've written an alternative mouse input method that does not rely on LRESULT CALLBACK WndProc(HWND window, UINT message, WPARAM wParam, LPARAM lParam) {
if(message==WM_DESTROY) {
running = false;
PostQuitMessage(0);
exit(0);
} else if(message==WM_MOUSEMOVE) {
static int last_x=(int)camera.width/2, last_y=(int)camera.height/2;
const int new_x=(int)LOWORD(lParam), new_y=(int)HIWORD(lParam);
camera.input_mouse_dragged(new_x-last_x, new_y-last_y);
last_x = new_x;
last_y = new_y;
} else if(message==WM_MOUSEWHEEL) {
if((short)HIWORD(wParam)>0) camera.input_scroll_up(); else camera.input_scroll_down();
} else if(message==WM_LBUTTONDOWN||message==WM_MBUTTONDOWN||message==WM_RBUTTONDOWN) {
ShowCursor(!camera.lockmouse); // show/hide cursor
camera.input_key('U');
} else if(message==WM_KEYDOWN) {
int key = key_windows((int)wParam);
if(key=='U') ShowCursor(!camera.lockmouse); // show/hide cursor
camera.set_key_state(key, true);
key_bindings(key);
} else if(message==WM_KEYUP) {
int key = key_windows((int)wParam);
camera.set_key_state(key, false);
}
return DefWindowProc(window, message, wParam, lParam);
} This workaround is not a suitable general solution however, as rotation stops as soon as the cursor hits the screen boundaries and on small screens you can't fully rotate ±90° vertically and 360° horizontally. So I put this code only here and not in the repo. As 2 alternatives with the mouse input version in the repo, you can try:
Kind regards, |
Hi @ProjectPhysX! |
When I connect to a Windows PC with Remote Desktop, it is not possible to control the camera view with a mouse. Any very slight movement of the mouse causes a crazy response. I/J/J/L keyboard control works well.
The text was updated successfully, but these errors were encountered: