diff options
Diffstat (limited to 'src/JSystem/JUtility/JUTDbPrint.cpp')
| -rw-r--r-- | src/JSystem/JUtility/JUTDbPrint.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/JSystem/JUtility/JUTDbPrint.cpp b/src/JSystem/JUtility/JUTDbPrint.cpp index 9adab8141b..dadcd798a4 100644 --- a/src/JSystem/JUtility/JUTDbPrint.cpp +++ b/src/JSystem/JUtility/JUTDbPrint.cpp @@ -6,6 +6,15 @@ #include "JSystem/JUtility/JUTVideo.h" #include <cstdio> +inline void enter_(int param_0, int param_1, int param_2, const char* fmt, va_list args) { + char buf[0x100]; + int ret = vsnprintf(buf, 0x100, fmt, args); + if (ret < 0) { + return; + } + JUTDbPrint::getManager()->enter(param_0, param_1, param_2, buf, ret < 0x100 ? ret : 0xFF); +} + JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) { mFont = pFont; mFirst = NULL; @@ -50,6 +59,11 @@ void JUTDbPrint::enter(int param_0, int param_1, int param_2, const char* param_ } } +static void dummy() { + va_list args; + enter_(0, 0, 0, 0, args); +} + void JUTDbPrint::flush() { this->flush(0, 0, JUTVideo::getManager()->getFbWidth(), JUTVideo::getManager()->getEfbHeight()); } @@ -89,27 +103,13 @@ void JUTDbPrint::drawString(int posX, int posY, int len, const u8* str) { void JUTReport(int param_0, int param_1, char const* fmt, ...) { va_list args; va_start(args, fmt); - - char buf[0x100]; - int ret = vsnprintf(buf, 0x100, fmt, args); + enter_(param_0, param_1, 1, fmt, args); va_end(args); - - if (ret < 0) { - return; - } - JUTDbPrint::sDebugPrint->enter(param_0, param_1, 1, buf, ret < 0x100 ? ret : 0xFF); } void JUTReport(int param_0, int param_1, int param_2, char const* fmt, ...) { va_list args; va_start(args, fmt); - - char buf[0x100]; - int ret = vsnprintf(buf, 0x100, fmt, args); + enter_(param_0, param_1, param_2, fmt, args); va_end(args); - - if (ret < 0) { - return; - } - JUTDbPrint::sDebugPrint->enter(param_0, param_1, param_2, buf, ret < 0x100 ? ret : 0xFF); } |
