From d417b5bbd5dc387b25a115e247c9c3a451d830f9 Mon Sep 17 00:00:00 2001 From: Timerix Date: Fri, 9 Jan 2026 11:12:34 +0500 Subject: [PATCH] fixed unicode input on windows --- include/tim.h | 4 ---- src/windows.c | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/include/tim.h b/include/tim.h index a1f9b5e..09d3502 100644 --- a/include/tim.h +++ b/include/tim.h @@ -15,10 +15,6 @@ #define _CRT_SECURE_NO_WARNINGS #define WIN32_LEAN_AND_MEAN #include - - // fix windows.h name clash, coincidentally they have the same values - #undef TimEvent_Key // 0x0001 - #undef TimEvent_Mouse // 0x0002 #ifdef _MSC_VER // disable integer conversion warnings diff --git a/src/windows.c b/src/windows.c index 987ee42..cc5fc10 100755 --- a/src/windows.c +++ b/src/windows.c @@ -113,7 +113,7 @@ void tim_read_event(i32 timeout_ms) { // received input INPUT_RECORD rec = {0}; DWORD n = 0; - ReadConsoleInput(h, &rec, 1, &n); + ReadConsoleInputW(h, &rec, 1, &n); switch (rec.EventType) { case KEY_EVENT: {