| 748 | } |
| 749 | |
| 750 | s32 cdvdCtrlTrayClose() |
| 751 | { |
| 752 | if (!(cdvd.Status & CDVD_STATUS_TRAY_OPEN)) |
| 753 | return 0x80; |
| 754 | |
| 755 | DevCon.WriteLn(Color_Green, "Close virtual disk tray"); |
| 756 | |
| 757 | if (VMManager::Internal::IsFastBootInProgress()) |
| 758 | { |
| 759 | DevCon.WriteLn(Color_Green, "Media already loaded (fast boot)"); |
| 760 | cdvdUpdateReady(CDVD_DRIVE_READY); |
| 761 | cdvdUpdateStatus(CDVD_STATUS_PAUSE); |
| 762 | cdvd.Spinning = true; |
| 763 | cdvd.Tray.trayState = CDVD_DISC_ENGAGED; |
| 764 | cdvd.Tray.cdvdActionSeconds = 0; |
| 765 | } |
| 766 | else |
| 767 | { |
| 768 | DevCon.WriteLn(Color_Green, "Detecting media"); |
| 769 | cdvdUpdateReady(CDVD_DRIVE_BUSY); |
| 770 | cdvdUpdateStatus(CDVD_STATUS_STOP); |
| 771 | cdvd.Spinning = false; |
| 772 | cdvd.Tray.trayState = CDVD_DISC_DETECTING; |
| 773 | cdvd.Tray.cdvdActionSeconds = 3; |
| 774 | } |
| 775 | cdvdDetectDisk(); |
| 776 | |
| 777 | return 0; // needs to be 0 for success according to homebrew test "CDVD" |
| 778 | } |
| 779 | |
| 780 | // check whether disc is single or dual layer |
| 781 | // if its dual layer, check what the disctype is and what sector number |
no test coverage detected