mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-02-01 12:32:48 +00:00
DVDInterface: Move a check from SetDiscInside to SetLidOpen
This commit is contained in:
parent
0abf875a3f
commit
740e4d0992
@ -507,9 +507,7 @@ bool VolumeIsValid()
|
|||||||
|
|
||||||
void SetDiscInside(bool disc_inside)
|
void SetDiscInside(bool disc_inside)
|
||||||
{
|
{
|
||||||
if (s_disc_inside != disc_inside)
|
|
||||||
SetLidOpen(!disc_inside);
|
SetLidOpen(!disc_inside);
|
||||||
|
|
||||||
s_disc_inside = disc_inside;
|
s_disc_inside = disc_inside;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -572,8 +570,9 @@ void ChangeDiscAsCPU(const std::string& new_path)
|
|||||||
|
|
||||||
void SetLidOpen(bool open)
|
void SetLidOpen(bool open)
|
||||||
{
|
{
|
||||||
|
u32 old_value = s_DICVR.CVR;
|
||||||
s_DICVR.CVR = open ? 1 : 0;
|
s_DICVR.CVR = open ? 1 : 0;
|
||||||
|
if (s_DICVR.CVR != old_value)
|
||||||
GenerateDIInterrupt(INT_CVRINT);
|
GenerateDIInterrupt(INT_CVRINT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user