| 88 | } |
| 89 | |
| 90 | void SetConsoleCursorPos(int x, int y, void* unused) |
| 91 | { |
| 92 | #if !defined(_WIN32) |
| 93 | nullcThrowError("SetConsoleCursorPos: supported only under Windows"); |
| 94 | #else |
| 95 | if(x < 0 || y < 0) |
| 96 | { |
| 97 | nullcThrowError("SetConsoleCursorPos: Negative values are not allowed"); |
| 98 | return; |
| 99 | } |
| 100 | COORD coords; |
| 101 | coords.X = (short)x; |
| 102 | coords.Y = (short)y; |
| 103 | HANDLE conStdOut = GetStdHandle(STD_OUTPUT_HANDLE); |
| 104 | SetConsoleCursorPosition(conStdOut, coords); |
| 105 | #endif |
| 106 | } |
| 107 | |
| 108 | void GetKeyboardState(NULLCArray<char > state, void* unused) |
| 109 | { |
nothing calls this directly
no test coverage detected