diff --git a/libctru/include/3ds/console.h b/libctru/include/3ds/console.h index e2e4a87..98ea99c 100644 --- a/libctru/include/3ds/console.h +++ b/libctru/include/3ds/console.h @@ -116,8 +116,9 @@ typedef struct PrintConsole /// Console debug devices supported by libnds. typedef enum { debugDevice_NULL, ///< Swallows prints to stderr - debugDevice_3DMOO, ///< Directs stderr debug statements to 3dmoo + debugDevice_SVC, ///< Outputs stderr debug statements using svcOutputDebugString, which can then be captured by interactive debuggers debugDevice_CONSOLE, ///< Directs stderr debug statements to 3DS console window + debugDevice_3DMOO = debugDevice_SVC, } debugDevice; /** diff --git a/libctru/source/console.c b/libctru/source/console.c index 207be3f..f147b73 100644 --- a/libctru/source/console.c +++ b/libctru/source/console.c @@ -471,14 +471,14 @@ static const devoptab_t dotab_stdout = { }; //--------------------------------------------------------------------------------- -ssize_t debug_write(struct _reent *r, void *fd, const char *ptr, size_t len) { +static ssize_t debug_write(struct _reent *r, void *fd, const char *ptr, size_t len) { //--------------------------------------------------------------------------------- svcOutputDebugString(ptr,len); return len; } -static const devoptab_t dotab_3dmoo = { - "3dmoo", +static const devoptab_t dotab_svc = { + "svc", 0, NULL, NULL, @@ -553,8 +553,8 @@ void consoleDebugInit(debugDevice device){ switch(device) { - case debugDevice_3DMOO: - devoptab_list[STD_ERR] = &dotab_3dmoo; + case debugDevice_SVC: + devoptab_list[STD_ERR] = &dotab_svc; buffertype = _IOLBF; break; case debugDevice_CONSOLE: