MCPcopy Create free account
hub / github.com/bfbbdecomp/bfbb / CheckResetButton

Method CheckResetButton

src/SB/Core/gc/iTRC.cpp:339–374  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

337}
338
339void ResetButton::CheckResetButton()
340{
341 BOOL reset_button_state = OSGetResetButtonState();
342 if (!reset_button_state && mWasResetButtonPressed)
343 {
344 if (mResetEnabled)
345 {
346 OSDisableInterrupts();
347 if (mSndKill)
348 {
349 mSndKill();
350 }
351
352 PADRecalibrate(0xf0000000);
353 VISetBlack(TRUE);
354 VIFlush();
355 VIWaitForRetrace();
356 OSEnableInterrupts();
357
358 if (DVDGetDriveStatus() == DVD_STATE_WRONG_DISK ||
359 DVDGetDriveStatus() == DVD_STATE_COVER_OPEN ||
360 DVDCheckDisk() == FALSE && DVDGetDriveStatus() == DVD_STATE_END)
361 {
362 OSResetSystem(TRUE, 0, FALSE);
363 }
364 else
365 {
366 OSResetSystem(FALSE, 0, FALSE);
367 }
368 }
369 }
370 else
371 {
372 mWasResetButtonPressed = reset_button_state;
373 }
374}
375
376void iTRCDisk::Init()
377{

Callers

nothing calls this directly

Calls 9

OSGetResetButtonStateFunction · 0.85
OSDisableInterruptsFunction · 0.85
PADRecalibrateFunction · 0.85
VISetBlackFunction · 0.85
VIFlushFunction · 0.85
VIWaitForRetraceFunction · 0.85
DVDGetDriveStatusFunction · 0.85
DVDCheckDiskFunction · 0.85
OSResetSystemFunction · 0.85

Tested by

no test coverage detected