Update common.cpp

This commit is contained in:
CRGBS 2023-05-24 14:12:47 +08:00 committed by GitHub
parent c826d5221c
commit d973514da5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -578,7 +578,7 @@ void console_set_color(console_state & con_st, console_color_t color) {
} }
char32_t getchar32() { char32_t getchar32() {
#if defined(_WIN32) /*#if defined(_WIN32)
HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE); HANDLE hConsole = GetStdHandle(STD_INPUT_HANDLE);
wchar_t high_surrogate = 0; wchar_t high_surrogate = 0;
@ -608,7 +608,7 @@ char32_t getchar32() {
return static_cast<char32_t>(wc); return static_cast<char32_t>(wc);
} }
} }
#else #else*/
wchar_t wc = getwchar(); wchar_t wc = getwchar();
if (static_cast<wint_t>(wc) == WEOF) { if (static_cast<wint_t>(wc) == WEOF) {
return WEOF; return WEOF;
@ -627,7 +627,7 @@ char32_t getchar32() {
#endif #endif
return static_cast<char32_t>(wc); return static_cast<char32_t>(wc);
#endif //#endif
} }
void pop_cursor(console_state & con_st) { void pop_cursor(console_state & con_st) {