diff options
| author | TakaRikka <takarikka@outlook.com> | 2023-02-26 22:18:40 -0800 |
|---|---|---|
| committer | TakaRikka <takarikka@outlook.com> | 2023-02-26 22:18:40 -0800 |
| commit | eae9455a7df805d653aae76de2eec5af8e81fbf4 (patch) | |
| tree | 2be6809331693f37caeb9f832c0a53082ce94003 /libs/JSystem/JUtility/JUTConsole.cpp | |
| parent | 090dcee01206bf7ba6b2231747f0b083521019f1 (diff) | |
JUtility / JSupport / misc cleanup
Diffstat (limited to 'libs/JSystem/JUtility/JUTConsole.cpp')
| -rw-r--r-- | libs/JSystem/JUtility/JUTConsole.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libs/JSystem/JUtility/JUTConsole.cpp b/libs/JSystem/JUtility/JUTConsole.cpp index 9cba998b83..f104b08f59 100644 --- a/libs/JSystem/JUtility/JUTConsole.cpp +++ b/libs/JSystem/JUtility/JUTConsole.cpp @@ -10,7 +10,6 @@ #include "JSystem/JUtility/JUTVideo.h" #include "MSL_C/MSL_Common/Src/printf.h" #include "dol2asm.h" -#include "dolphin/types.h" // // Forward References: @@ -315,10 +314,12 @@ void JUTConsole::scroll(int scrollAmnt) { } } } + field_0x30 += scrollAmnt; if (field_0x30 < 0) { field_0x30 += mMaxLines; } + if (field_0x30 >= mMaxLines) { field_0x30 -= mMaxLines; } @@ -346,6 +347,7 @@ JUTConsoleManager* JUTConsoleManager::createManager(JKRHeap* pHeap) { if (pHeap == NULL) { pHeap = JKRHeap::sCurrentHeap; } + JUTConsoleManager* manager = new (pHeap, 0) JUTConsoleManager(); sManager = manager; return manager; @@ -457,7 +459,8 @@ extern "C" void JUTReportConsole_f_va(const char* fmt, va_list args) { if (JUTGetReportConsole() == NULL) { vsnprintf(buf, sizeof(buf), fmt, args); } else if (JUTGetReportConsole()->getOutput() & - (JUTConsole::OUTPUT_CONSOLE | JUTConsole::OUTPUT_OSREPORT)) { + (JUTConsole::OUTPUT_CONSOLE | JUTConsole::OUTPUT_OSREPORT)) + { vsnprintf(buf, sizeof(buf), fmt, args); JUTGetReportConsole()->print(buf); } |
