1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-03-22 06:38:37 -05:00

Jordan Russell's patch to match the PuTTY cursor blink rate to the

system-configured one.

[originally from svn r1036]
This commit is contained in:
Simon Tatham 2001-04-11 10:03:46 +00:00
parent d2369721bb
commit ac5bebc71d

View File

@ -1858,8 +1858,8 @@ static void do_paint (Context ctx, int may_optimise){
*/ */
void term_blink(int flg) { void term_blink(int flg) {
static long last_blink = 0; static long last_blink = 0;
static long last_tblink = 0; static long last_tblink = 0;
long now, blink_diff; long now, blink_diff;
now = GetTickCount(); now = GetTickCount();
@ -1880,8 +1880,8 @@ static long last_tblink = 0;
blink_diff = now-last_blink; blink_diff = now-last_blink;
/* Make sure the cursor blinks no more than 2Hz */ /* Make sure the cursor blinks no faster than GetCaretBlinkTime() */
if (blink_diff>=0 && blink_diff<450) if (blink_diff>=0 && blink_diff<(long)GetCaretBlinkTime())
return; return;
last_blink = now; last_blink = now;