mirror of
https://github.com/ArthurSonzogni/FTXUI.git
synced 2024-10-31 08:19:34 +08:00
[Win] Fixed usage of ReadConsoleInput (#74)
ReadConsoleInput params: |nLength| is the size in array elements, not in byte. Co-authored-by: d <d>
This commit is contained in:
parent
d48e3decfc
commit
9cc3779145
@ -64,7 +64,7 @@ void EventListener(std::atomic<bool>* quit,
|
||||
std::vector<INPUT_RECORD> records{number_of_events};
|
||||
DWORD number_of_events_read = 0;
|
||||
ReadConsoleInput(console, records.data(),
|
||||
(DWORD)(records.size() * sizeof(INPUT_RECORD)),
|
||||
(DWORD)records.size(),
|
||||
&number_of_events_read);
|
||||
records.resize(number_of_events_read);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user