fixed unicode input on windows

This commit is contained in:
2026-01-09 11:12:34 +05:00
parent 1ce7090bd6
commit d417b5bbd5
2 changed files with 1 additions and 5 deletions

View File

@@ -16,10 +16,6 @@
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
// fix windows.h name clash, coincidentally they have the same values
#undef TimEvent_Key // 0x0001
#undef TimEvent_Mouse // 0x0002
#ifdef _MSC_VER #ifdef _MSC_VER
// disable integer conversion warnings // disable integer conversion warnings
#pragma warning(disable:4244) #pragma warning(disable:4244)

View File

@@ -113,7 +113,7 @@ void tim_read_event(i32 timeout_ms) {
// received input // received input
INPUT_RECORD rec = {0}; INPUT_RECORD rec = {0};
DWORD n = 0; DWORD n = 0;
ReadConsoleInput(h, &rec, 1, &n); ReadConsoleInputW(h, &rec, 1, &n);
switch (rec.EventType) { switch (rec.EventType) {
case KEY_EVENT: { case KEY_EVENT: {