Skip to content

Commit

Permalink
fix RDP mouse jiggler disabling
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-André Moreau authored and awakecoding committed Oct 8, 2024
1 parent ac68cfc commit 32a26ee
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions dll/ApiHooks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -738,20 +738,23 @@ LRESULT CALLBACK Hook_IHWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPar
MsRdpEx_LogPrint(DEBUG, "Mouse Jiggler: Enabled=%d, Interval=%d, Method=%d",
mouseJigglerEnabled ? 1 : 0, mouseJigglerInterval, mouseJigglerMethod);

uint32_t timerEventId = MOUSE_JIGGLER_MOVE_MOUSE_TIMER_ID;

switch (mouseJigglerMethod)
if (mouseJigglerEnabled)
{
uint32_t timerEventId = MOUSE_JIGGLER_MOVE_MOUSE_TIMER_ID;

switch (mouseJigglerMethod)
{
case 0:
timerEventId = MOUSE_JIGGLER_MOVE_MOUSE_TIMER_ID;
break;

case 1:
timerEventId = MOUSE_JIGGLER_SPECIAL_KEY_TIMER_ID;
break;
}
}

SetTimer(hWnd, timerEventId, mouseJigglerInterval * 1000, NULL);
SetTimer(hWnd, timerEventId, mouseJigglerInterval * 1000, NULL);
}

if (pExtendedSettings->GetExtraSystemMenuEnabled())
{
Expand Down

0 comments on commit 32a26ee

Please sign in to comment.