| 2011 | |
| 2012 | |
| 2013 | VOID CALLBACK InputTimeout(HWND hWnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime) |
| 2014 | { |
| 2015 | int new_timer_period = 0; |
| 2016 | for (auto *input = g_input; input; input = input->Prev) |
| 2017 | { |
| 2018 | if (input->Timeout && input->InProgress()) |
| 2019 | { |
| 2020 | int time_left = int(input->TimeoutAt - dwTime); |
| 2021 | if (time_left <= 0) |
| 2022 | input->EndByTimeout(); |
| 2023 | else if (time_left < new_timer_period || !new_timer_period) |
| 2024 | new_timer_period = time_left; |
| 2025 | } |
| 2026 | } |
| 2027 | if (new_timer_period != 0) |
| 2028 | SET_INPUT_TIMER(new_timer_period, dwTime + new_timer_period) |
| 2029 | else |
| 2030 | KILL_INPUT_TIMER |
| 2031 | } |
| 2032 | |
| 2033 | |
| 2034 |
nothing calls this directly
no test coverage detected