JFWDisplay debug (#3022)

This commit is contained in:
Jcw87
2026-01-07 09:52:16 -08:00
committed by GitHub
parent fd863582d6
commit a313c26f0b
7 changed files with 64 additions and 44 deletions
+2 -1
View File
@@ -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);
}
+3 -2
View File
@@ -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; }
+2 -2
View File
@@ -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; }
+7 -3
View File
@@ -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 {