| 337 | } |
| 338 | |
| 339 | void 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 | |
| 376 | void iTRCDisk::Init() |
| 377 | { |
nothing calls this directly
no test coverage detected