7 Commits

Author SHA1 Message Date
Glenn Maynard
9167c9e0ed Use GetOverlappedResult instead of GetOverlappedResultEx for Windows 7. 2019-01-18 19:46:19 -06:00
Glenn Maynard
849fd7a975 Simplify overlapped I/O handling, and add a command timeout.
If we don't get a response from a command in a while, resend it.  This doesn't
normally happen (it only happened during firmware development), but it makes
command sending more robust, so let's keep it.  This also uses a single OVERLAPPED
for a whole command, which is simpler.
2019-01-03 18:13:51 -06:00
Glenn Maynard
48c75ba224 Pass the packet response to completion callbacks. 2019-01-01 18:00:27 -06:00
Glenn Maynard
4691ce5ecf If commands are buffered and not sent when the device is disconnected, call any completion callbacks.
This is to guarantee that completion callbacks are always called, so if any
resource collection happens in them it'll always happen.
2018-12-09 16:11:12 -06:00
Glenn Maynard
65f4a7102c Check for out of sequence PACKET_FLAG_START_OF_COMMAND.
This improves recovery if a start packet is received when we didn't receive a complete
packet earlier.  This doesn't normally happen, this just matches the error recovery used
in game.
2018-10-19 18:55:50 -05:00
Glenn Maynard
8ea8070d51 Some disabled logs for testing (disabled because they're noisy). 2018-06-07 16:06:50 -05:00
Glenn Maynard
57379383c0 Import for release. 2017-12-15 02:55:34 -06:00