From 5510c207e61fd70df9060ac9c3dd72aa5393ec94 Mon Sep 17 00:00:00 2001 From: omegadox Date: Tue, 23 Dec 2008 06:00:43 +0000 Subject: [PATCH] Added feature "Toggle DVD cover is open", it seems to work but the video message for "Insert Disc" will not show for some reason, so instead the video freezes. Next, the code to let you change the disc needs to be added. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1627 8ced0084-cf51-0410-be5f-012b33b47a6e --- Source/Core/Core/Src/HW/DVDInterface.cpp | 6 +++--- Source/Core/DolphinWX/Src/Frame.cpp | 7 +++---- Source/Core/DolphinWX/Src/Globals.h | 2 +- 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Source/Core/Core/Src/HW/DVDInterface.cpp b/Source/Core/Core/Src/HW/DVDInterface.cpp index c9dd908ca6..b97d5005ad 100644 --- a/Source/Core/Core/Src/HW/DVDInterface.cpp +++ b/Source/Core/Core/Src/HW/DVDInterface.cpp @@ -224,11 +224,11 @@ void SetDiscInside(bool _DiscInside) void SetLidOpen(bool _bOpen) { if (_bOpen) - dvdMem.CoverReg.CVR = 1; + dvdMem.CoverReg.Hex = 0x7; else - dvdMem.CoverReg.CVR = 0; + dvdMem.CoverReg.Hex = 0x0; - UpdateInterrupts(); + CPeripheralInterface::SetInterrupt(CPeripheralInterface::INT_CAUSE_DI, true); } bool IsLidOpen() diff --git a/Source/Core/DolphinWX/Src/Frame.cpp b/Source/Core/DolphinWX/Src/Frame.cpp index 19aafe0570..08e03d976e 100644 --- a/Source/Core/DolphinWX/Src/Frame.cpp +++ b/Source/Core/DolphinWX/Src/Frame.cpp @@ -98,7 +98,7 @@ EVT_MENU(IDM_CONFIG_WIIMOTE_PLUGIN, CFrame::OnPluginWiimote) EVT_MENU(IDM_BROWSE, CFrame::OnBrowse) EVT_MENU(IDM_MEMCARD, CFrame::OnMemcard) EVT_MENU(IDM_CHEATS, CFrame::OnShow_CheatsWindow) -EVT_MENU(IDM_SWAPDISC, CFrame::OnSwapDisc) +EVT_MENU(IDM_TOGGLECOVER, CFrame::OnSwapDisc) EVT_MENU(IDM_TOGGLE_FULLSCREEN, CFrame::OnToggleFullscreen) EVT_MENU(IDM_TOGGLE_DUALCORE, CFrame::OnToggleDualCore) EVT_MENU(IDM_TOGGLE_SKIPIDLE, CFrame::OnToggleSkipIdle) @@ -250,7 +250,7 @@ void CFrame::CreateMenu() miscMenu->AppendSeparator(); miscMenu->Append(IDM_MEMCARD, _T("&Memcard manager")); miscMenu->Append(IDM_CHEATS, _T("Action &Replay Manager")); - // miscMenu->Append(IDM_SWAPDISC, _T("S&wap Disc")); + miscMenu->Append(IDM_TOGGLECOVER, _T("Toggle DVD co&ver is open")); m_pMenuBar->Append(miscMenu, _T("&Misc")); // help menu @@ -683,6 +683,5 @@ void CFrame::UpdateGUI() void CFrame::OnSwapDisc(wxCommandEvent& WXUNUSED (event)) { - PanicAlert("Omega: I opened the lid"); - SetLidOpen(true); + SetLidOpen(!IsLidOpen()); } \ No newline at end of file diff --git a/Source/Core/DolphinWX/Src/Globals.h b/Source/Core/DolphinWX/Src/Globals.h index bb6fdf2475..bc3dc0be03 100644 --- a/Source/Core/DolphinWX/Src/Globals.h +++ b/Source/Core/DolphinWX/Src/Globals.h @@ -48,7 +48,7 @@ enum IDM_BROWSE, IDM_MEMCARD, IDM_CHEATS, - IDM_SWAPDISC, + IDM_TOGGLECOVER, IDM_PROPERTIES, IDM_OPENCONTAININGFOLDER, IDM_SETDEFAULTGCM,