fixed unicode input on windows
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
@@ -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: {
|
||||||
|
|||||||
Reference in New Issue
Block a user