MCPcopy Create free account
hub / github.com/doldecomp/mkdd / ctrlDebugMode

Method ctrlDebugMode

src/Kaneshige/SysDebug.cpp:79–224  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77}
78
79void SysDebug::ctrlDebugMode() {
80 if(mDrawPage) {
81 JUTProcBar::getManager()->setVisible(true);
82 f32 cpuFrameTime = JUTProcBar::getManager()->getCpuCost() / 16666.666f;
83 f32 gpuFrameTime = JUTProcBar::getManager()->getGpCost() / 16666.666f;
84
85 if(mCPUTimes) {
86 mCPUTimes[mBufferIdx] = cpuFrameTime;
87 mGPUTimes[mBufferIdx] = gpuFrameTime;
88 mBufferIdx++;
89 if (mBufferIdx >= 60)
90 mDrawProcTime = true;
91
92 mBufferIdx = mBufferIdx % 60;
93 }
94
95 if(mPageNo >= 0 && mPageNo <= 2) {
96 if(mGamePad.testTrigger(JUTGamePad::L)) {
97 if(mPageNo > 0)
98 mPageNo--;
99 else
100 mPageNo = 2;
101 }
102 if(mGamePad.testTrigger(JUTGamePad::R)) {
103 if(mPageNo < 2)
104 mPageNo++;
105 else
106 mPageNo = 0;
107 }
108 }
109
110 switch (mPageNo)
111 {
112 case 0:
113 {
114 if(mGamePad.testTrigger(JUTGamePad::Y)) {
115 if(mDrawUserTime)
116 mDrawUserTime = false;
117 else
118 mDrawUserTime = true;
119 }
120 switch(mProcTimeType) {
121 case 0:
122 {
123 if (mGamePad.testTrigger(JUTGamePad::CSTICK_DOWN))
124 mProcTimeType = 1;
125 break;
126 }
127 case 1:
128 {
129 mProcTimeFrames++;
130
131 if(cpuFrameTime > mCPUTimeMax)
132 mCPUTimeMax = cpuFrameTime;
133 mCPUTime += cpuFrameTime;
134
135 if(gpuFrameTime > mAllTimeMax)
136 mAllTimeMax = gpuFrameTime;

Callers 1

endFrameFunction · 0.80

Calls 15

getSystemHeapFunction · 0.85
getCpuCostMethod · 0.80
getGpCostMethod · 0.80
testTriggerMethod · 0.80
getPrevChildMethod · 0.80
getNumChildrenMethod · 0.80
getLastChildMethod · 0.80
getNextChildMethod · 0.80
testButtonMethod · 0.80
setVisibleMethod · 0.45
getEndChildMethod · 0.45
getObjectMethod · 0.45

Tested by

no test coverage detected