CD audio status returns zero start and end times when no track is playing. Fixes The Manhole.
Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3839
This commit is contained in:
parent
ec9de6ff36
commit
49875ee505
1 changed files with 15 additions and 10 deletions
|
@ -506,16 +506,21 @@ bool CMscdex::GetAudioStatus(Bit8u subUnit, bool& playing, bool& pause, TMSF& st
|
|||
if (subUnit>=numDrives) return false;
|
||||
dinfo[subUnit].lastResult = cdrom[subUnit]->GetAudioStatus(playing,pause);
|
||||
if (dinfo[subUnit].lastResult) {
|
||||
// Start
|
||||
Bit32u addr = dinfo[subUnit].audioStart + 150;
|
||||
start.fr = (Bit8u)(addr%75); addr/=75;
|
||||
start.sec = (Bit8u)(addr%60);
|
||||
start.min = (Bit8u)(addr/60);
|
||||
// End
|
||||
addr = dinfo[subUnit].audioEnd + 150;
|
||||
end.fr = (Bit8u)(addr%75); addr/=75;
|
||||
end.sec = (Bit8u)(addr%60);
|
||||
end.min = (Bit8u)(addr/60);
|
||||
if (playing) {
|
||||
// Start
|
||||
Bit32u addr = dinfo[subUnit].audioStart + 150;
|
||||
start.fr = (Bit8u)(addr%75); addr/=75;
|
||||
start.sec = (Bit8u)(addr%60);
|
||||
start.min = (Bit8u)(addr/60);
|
||||
// End
|
||||
addr = dinfo[subUnit].audioEnd + 150;
|
||||
end.fr = (Bit8u)(addr%75); addr/=75;
|
||||
end.sec = (Bit8u)(addr%60);
|
||||
end.min = (Bit8u)(addr/60);
|
||||
} else {
|
||||
memset(&start,0,sizeof(start));
|
||||
memset(&end,0,sizeof(end));
|
||||
}
|
||||
} else {
|
||||
playing = false;
|
||||
pause = false;
|
||||
|
|
Loading…
Add table
Reference in a new issue