match JFWDisplay on J

This commit is contained in:
LagoLunatic
2023-11-12 03:47:42 -05:00
parent b22bf1d2a8
commit 71ec033a3c
3 changed files with 14 additions and 8 deletions
+1 -1
View File
@@ -33,7 +33,7 @@ public:
width = (u16)getFbWidth();
height = (u16)getEfbHeight();
}
u16 getXfbHeight() const { return mRenderObj->xfb_height; }
u32 getXfbHeight() const { return mRenderObj->xfb_height; }
u32 isAntiAliasing() const { return mRenderObj->antialiasing; }
Pattern getSamplePattern() const { return mRenderObj->sample_pattern; }
u8* getVFilter() const { return mRenderObj->vfilter; }
+12 -6
View File
@@ -75,7 +75,7 @@ JFWDisplay::~JFWDisplay() {
/* 80255354-802553EC .text createManager__10JFWDisplayFP7JKRHeapQ26JUTXfb10EXfbNumberb */
JFWDisplay* JFWDisplay::createManager(JKRHeap* p_heap, JUTXfb::EXfbNumber xfb_num, bool enableAlpha) {
JUT_CONFIRM(243, sManager == 0);
JUT_CONFIRM(VERSION_SELECT(244, 243, 243), sManager == 0);
if(sManager == 0) {
sManager = new JFWDisplay(0, p_heap, xfb_num, enableAlpha);
}
@@ -99,13 +99,19 @@ void JFWDisplay::prepareCopyDisp() {
_GXRenderModeObj* renderObj = JUTVideo::getManager()->getRenderMode();
u16 width, height;
JUTVideo::getManager()->getBounds(width, height);
u16 xfb_height = renderObj->xfb_height;
f32 y_scaleF = GXGetYScaleFactor(height, renderObj->xfb_height);
u16 xfb_height = JUTVideo::getManager()->getXfbHeight();
#if VERSION != VERSION_JPN
f32 y_scaleF = GXGetYScaleFactor(height, xfb_height);
#endif
GXSetCopyClear(mClearColor, mZClear);
GXSetDispCopySrc(0, 0, width, height);
GXSetDispCopyDst(width, xfb_height);
#if VERSION == VERSION_JPN
GXSetDispCopyYScale(xfb_height / (f32)height);
#else
GXSetDispCopyYScale(y_scaleF);
#endif
VIFlush();
GXSetCopyFilter((GXBool)renderObj->antialiasing, renderObj->sample_pattern, GX_ENABLE, renderObj->vfilter);
GXSetCopyClamp((GXFBClamp)mClamp);
@@ -492,12 +498,12 @@ void JFWGXAbortAlarmHandler(OSAlarm*, OSContext*) {
diagnoseGpHang();
if(JFWAutoAbortGfx != true) {
OSReport("自動復帰しません\n");
JUT_WARN(1350, "GP FREEZE!");
JUT_ASSERT(1351, 0);
JUT_WARN(VERSION_SELECT(1351, 1350, 1350), "GP FREEZE!");
JUT_ASSERT(VERSION_SELECT(1352, 1351, 1351), 0);
}
else {
OSReport("GXAbortFrame() を呼び出し、復帰します\n");
JUT_WARN(1355, "GP FREEZE! AUTO RESUME");
JUT_WARN(VERSION_SELECT(1356, 1355, 1355), "GP FREEZE! AUTO RESUME");
GXAbortFrame();
GXSetDrawDone();
}
+1 -1
View File
@@ -16,7 +16,7 @@ JUTProcBar::JUTProcBar() {
mVisible = true;
mHeapBarVisible = true;
field_0x108 = 0;
u16 height = JUTVideo::getManager()->getXfbHeight();
u32 height = JUTVideo::getManager()->getXfbHeight();
if (height > 400) {
mParams.setBarWidth(2);
mParams.setPosition(39, height - 40);