summaryrefslogtreecommitdiff
path: root/libs/JSystem/JUtility/JUTConsole.cpp
diff options
context:
space:
mode:
authorTakaRikka <takarikka@outlook.com>2023-02-26 22:18:40 -0800
committerTakaRikka <takarikka@outlook.com>2023-02-26 22:18:40 -0800
commiteae9455a7df805d653aae76de2eec5af8e81fbf4 (patch)
tree2be6809331693f37caeb9f832c0a53082ce94003 /libs/JSystem/JUtility/JUTConsole.cpp
parent090dcee01206bf7ba6b2231747f0b083521019f1 (diff)
JUtility / JSupport / misc cleanup
Diffstat (limited to 'libs/JSystem/JUtility/JUTConsole.cpp')
-rw-r--r--libs/JSystem/JUtility/JUTConsole.cpp7
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);
}