jonathanstowe / TermReadKey

Character mode terminal access for Perl
12 stars 27 forks source link

W32: Fix ReadKey with argument in the range 0 < x < 1. #26

Closed amba closed 7 years ago

amba commented 7 years ago

Fix bug #25.

Trying this change on a Windows7 VM fixes the problem for me.

The argument was changed from a double to U32 in commit 549f0e68:

-use DWORD everywhere, DWORD==U32, WaitForSingleObject takes integers not FP numbers for the timeout

But with integers, you cannot properly scale from seconds to milliseconds.

jonathanstowe commented 7 years ago

Hmm, I'll take your word for it that it works on Windows but it doesn't compile on Linux at all https://travis-ci.org/jonathanstowe/TermReadKey/jobs/220661941 - I'll need to take a look at it before I merge.

amba commented 7 years ago

Fixed.

jonathanstowe commented 7 years ago

Thanks. Not really got a schedule for the next release right now, but in the next month or so I'd guess :)

amba commented 7 years ago

This also fixes ReadKey(-1), which blocked forever with the U32 argument.

Would be great to have this in the next StrawberryPerl. @kmx: What are your release plans?