Decompile `nuGfxSetCfb`
This commit is contained in:
parent
c23bc3a884
commit
6dde5925bc
|
|
@ -1,3 +1,37 @@
|
|||
#include "common.h"
|
||||
|
||||
INCLUDE_ASM(const s32, "nu/nugfxsetcfb", nuGfxSetCfb);
|
||||
#include "nu/nusys.h"
|
||||
|
||||
void nuGfxSetCfb(u16** framebuf, u32 framebufnum) {
|
||||
u32 i;
|
||||
|
||||
nuGfxCfb = framebuf;
|
||||
nuGfxCfbNum = framebufnum;
|
||||
nuGfxCfbCounter = 0;
|
||||
nuGfxCfb_ptr = nuGfxCfb[0];
|
||||
|
||||
nuGfxRetraceWait(1);
|
||||
nuScSetFrameBufferNum(framebufnum);
|
||||
|
||||
if (framebufnum > 1) {
|
||||
s32 i;
|
||||
|
||||
for (i = 0; i < framebufnum - 1; i++) {
|
||||
if (nuGfxCfb[i] != nuGfxCfb[i+1]) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == framebufnum - 1) {
|
||||
nuScSetFrameBufferNum(1);
|
||||
} else {
|
||||
for (i = 0; i < framebufnum; i++) {
|
||||
if (osViGetNextFramebuffer() != nuGfxCfb[i]) {
|
||||
nuGfxCfbCounter = i;
|
||||
nuGfxCfb_ptr = nuGfxCfb[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue