diff --git a/main.c b/main.c index a3fc9d9..c6ea121 100644 --- a/main.c +++ b/main.c @@ -348,9 +348,7 @@ static LRESULT CALLBACK main_window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPA case WM_LBUTTONDBLCLK: { int x = (short)LOWORD(lparam); int y = (short)HIWORD(lparam); - x = x / ui_win_scale[i]; - y = y / ui_win_scale[i]; - handled_lparam = MAKELPARAM(x, y); + handled_lparam = MAKELPARAM(x / ui_win_scale[i], y / ui_win_scale[i]); SDL_Event event = {}; switch (msg) { diff --git a/ntr_rp.c b/ntr_rp.c index 9bb84ad..7e9f37e 100644 --- a/ntr_rp.c +++ b/ntr_rp.c @@ -1277,5 +1277,6 @@ void input_redirection_send_frame(input_redirection_frame_t *frame) { if (sendto(ir_socket, (const char *)frame, sizeof(input_redirection_frame_t), 0, (struct sockaddr *)&addr, sizeof(addr)) < 0) { err_log("sendto error: %d\n", socket_errno()); closesocket(ir_socket); + ir_socket = INVALID_SOCKET; } }