MCPcopy Create free account
hub / github.com/WheretIB/nullc / SetConsoleCursorPos

Function SetConsoleCursorPos

NULLC/includes/io.cpp:122–138  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

120 }
121
122 void SetConsoleCursorPos(int x, int y)
123 {
124#if !defined(_MSC_VER)
125 nullcThrowError("SetConsoleCursorPos: supported only under Windows");
126#else
127 if(x < 0 || y < 0)
128 {
129 nullcThrowError("SetConsoleCursorPos: Negative values are not allowed");
130 return;
131 }
132 COORD coords;
133 coords.X = (short)x;
134 coords.Y = (short)y;
135 HANDLE conStdOut = GetStdHandle(STD_OUTPUT_HANDLE);
136 SetConsoleCursorPosition(conStdOut, coords);
137#endif
138 }
139
140 void GetKeyboardState(NULLCArray arr)
141 {

Callers

nothing calls this directly

Calls 1

nullcThrowErrorFunction · 0.50

Tested by

no test coverage detected