summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJcw87 <Jcw87@users.noreply.github.com>2026-01-07 09:52:16 -0800
committerGitHub <noreply@github.com>2026-01-07 19:52:16 +0200
commita313c26f0bc6d11bddc2b24c4367dc1040f604a4 (patch)
treebf9bac9543dee459c5e2e13c43c32a42952ec242 /include
parentfd863582d657bb2c70f7ac73d5f534c6b0be7aa6 (diff)
JFWDisplay debug (#3022)
Diffstat (limited to 'include')
-rw-r--r--include/JSystem/JFramework/JFWDisplay.h3
-rw-r--r--include/JSystem/JUtility/JUTProcBar.h5
-rw-r--r--include/JSystem/JUtility/JUTVideo.h4
-rw-r--r--include/JSystem/JUtility/JUTXfb.h10
4 files changed, 14 insertions, 8 deletions
diff --git a/include/JSystem/JFramework/JFWDisplay.h b/include/JSystem/JFramework/JFWDisplay.h
index df1917de48..b451f584bf 100644
--- a/include/JSystem/JFramework/JFWDisplay.h
+++ b/include/JSystem/JFramework/JFWDisplay.h
@@ -25,6 +25,7 @@ public:
void cancelAlarm() { OSCancelAlarm(this); }
void removeLink() { sList.remove(&mLink); }
void appendLink() { sList.append(&mLink); }
+ OSAlarm* getAlarm() const { return (OSAlarm*)this; }
OSThread* getThread() const { return mThread; }
void setThread(OSThread* thread) { mThread = thread; }
@@ -134,7 +135,7 @@ private:
/* 0x4A */ u8 field_0x4a;
};
-inline void JUTChangeFrameBuffer(void* buffer, u16 height, u16 width) {
+inline void JUTChangeFrameBuffer(void* buffer, u16 width, u16 height) {
JUTDirectPrint::getManager()->changeFrameBuffer(buffer, width, height);
}
diff --git a/include/JSystem/JUtility/JUTProcBar.h b/include/JSystem/JUtility/JUTProcBar.h
index e299caf005..ac9811f8fd 100644
--- a/include/JSystem/JUtility/JUTProcBar.h
+++ b/include/JSystem/JUtility/JUTProcBar.h
@@ -30,7 +30,8 @@ public:
}
void end() {
- mCost = ((OSGetTick() - mTick) * 8) / ((*(u32*)0x800000F8 / 4) / 125000);
+ OSTick diff = OSGetTick() - mTick;
+ mCost = OSTicksToMicroseconds(diff);
if (mCost == 0) {
mCost = 1;
}
@@ -94,7 +95,7 @@ public:
void wholeLoopEnd() { mWholeLoop.end(); }
void idleStart() { mIdle.start(255, 129, 30); }
void idleEnd() { mIdle.end(); }
- void setCostFrame(int frame) { mCostFrame = frame; }
+ void setCostFrame(int frame) { sManager->mCostFrame = frame; }
void setVisible(bool visible) { mVisible = visible; }
void setVisibleHeapBar(bool visible) { mHeapBarVisible = visible; }
void setWatchHeap(JKRHeap* pHeap) { mWatchHeap = pHeap; }
diff --git a/include/JSystem/JUtility/JUTVideo.h b/include/JSystem/JUtility/JUTVideo.h
index e1af0528e3..3c3eeeadaa 100644
--- a/include/JSystem/JUtility/JUTVideo.h
+++ b/include/JSystem/JUtility/JUTVideo.h
@@ -36,8 +36,8 @@ public:
width = (u16)getFbWidth();
height = (u16)getEfbHeight();
}
- u16 getXfbHeight() const { return mRenderObj->xfbHeight; }
- u32 isAntiAliasing() const { return mRenderObj->aa; }
+ u16 getXfbHeight() const { return u16(mRenderObj->xfbHeight); }
+ u8 isAntiAliasing() const { return u8(mRenderObj->aa); }
Pattern getSamplePattern() const { return mRenderObj->sample_pattern; }
u8* getVFilter() const { return mRenderObj->vfilter; }
OSMessageQueue* getMessageQueue() { return &mMessageQueue; }
diff --git a/include/JSystem/JUtility/JUTXfb.h b/include/JSystem/JUtility/JUTXfb.h
index 3c5966dbe4..b7c00cefde 100644
--- a/include/JSystem/JUtility/JUTXfb.h
+++ b/include/JSystem/JUtility/JUTXfb.h
@@ -45,9 +45,13 @@ public:
}
void* getDrawingXfb() const {
- if (mDrawingXfbIndex >= 0)
- return mBuffer[mDrawingXfbIndex];
- return NULL;
+ void* result;
+ if (mDrawingXfbIndex >= 0) {
+ result = mBuffer[mDrawingXfbIndex];
+ } else {
+ result = NULL;
+ }
+ return result;
}
void* getDisplayingXfb() const {