Skip to content

Commit

Permalink
Merge pull request #453 from RamonUnch/RamonUnch-RezTimer-3
Browse files Browse the repository at this point in the history
Improve RezTimer options
  • Loading branch information
RamonUnch authored Aug 15, 2023
2 parents e3aeec1 + ac0d712 commit 80bb5d4
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions hooks.c
Original file line number Diff line number Diff line change
Expand Up @@ -4833,17 +4833,23 @@ LRESULT CALLBACK LowLevelMouseProc(int nCode, WPARAM wParam, LPARAM lParam)
// Move the window && (state.moving || !IsSamePTT(&pt, &state.clickpt))
if (state.action && !state.blockmouseup) { // resize or move...
// Move the window every few frames.
if (conf.RezTimer) {
static DWORD oldtime;
if (conf.RezTimer==1) {
// Only move window if the EVENT TIME is different.
static DWORD oldtime;
//LOGA("msg->time=%lu", msg->time);
if (msg->time != oldtime) {
MouseMove(pt);
oldtime = msg->time;
}
} else {
static char updaterate;
static UCHAR updaterate;
updaterate = (updaterate+1)%(state.action==AC_MOVE? conf.MoveRate: conf.ResizeRate);
if(!updaterate) MouseMove(pt);
if (!updaterate) {
MouseMove(pt);
} else if (conf.RezTimer == 3 && msg->time != oldtime) {
MouseMove(pt);
oldtime = msg->time;
}
}
}
return CallNextHookEx(NULL, nCode, wParam, lParam);
Expand Down

0 comments on commit 80bb5d4

Please sign in to comment.