MCPcopy Create free account
hub / github.com/devkitPro/libctru / consolePosition

Function consolePosition

libctru/source/console.c:183–203  ·  view source on GitHub ↗

---------------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

181
182//---------------------------------------------------------------------------------
183static inline void consolePosition(int x, int y) {
184//---------------------------------------------------------------------------------
185 // invalid position
186 if(x < 0 || y < 0)
187 return;
188
189 // 1-based, but we'll take a 0
190 if(x < 1)
191 x = 1;
192 if(y < 1)
193 y = 1;
194
195 // clip to console edge
196 if(x > currentConsole->windowWidth)
197 x = currentConsole->windowWidth;
198 if(y > currentConsole->windowHeight)
199 y = currentConsole->windowHeight;
200
201 currentConsole->cursorX = x;
202 currentConsole->cursorY = y;
203}
204
205#define _ANSI_MAXARGS 16
206

Callers 1

con_writeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected