From f04a37de6c5511f1601efbb9c7ee92dc5214a5ae Mon Sep 17 00:00:00 2001 From: imlodinu Date: Thu, 6 Jul 2023 18:05:14 +0800 Subject: [PATCH] Revert "Add console output setting for windows" This reverts commit 20c9bf707771c3f25900093fddcd3c1554f2cff0. --- VM/src/lbaselib.cpp | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/VM/src/lbaselib.cpp b/VM/src/lbaselib.cpp index 8e046df5..f4dac61f 100644 --- a/VM/src/lbaselib.cpp +++ b/VM/src/lbaselib.cpp @@ -11,16 +11,6 @@ #include #include -#ifdef _WIN32 -#ifndef WIN32_LEAN_AND_MEAN -#define WIN32_LEAN_AND_MEAN -#endif -#ifndef NOMINMAX -#define NOMINMAX -#endif -#include -#endif - static void writestring(const char* s, size_t l) { fwrite(s, 1, l, stdout); @@ -28,10 +18,6 @@ static void writestring(const char* s, size_t l) static int luaB_print(lua_State* L) { -#ifdef _WIN32 - UINT oldcode = GetConsoleOutputCP(); - SetConsoleOutputCP(CP_UTF8); -#endif int n = lua_gettop(L); // number of arguments for (int i = 1; i <= n; i++) { @@ -43,9 +29,6 @@ static int luaB_print(lua_State* L) lua_pop(L, 1); // pop result } writestring("\n", 1); -#ifdef _WIN32 - SetConsoleOutputCP(oldcode); -#endif return 0; }