Added some handler code for when no CD drive can be found
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@13935 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -16,7 +16,8 @@
|
|||||||
CDAudioDevice::CDAudioDevice(void)
|
CDAudioDevice::CDAudioDevice(void)
|
||||||
{
|
{
|
||||||
FindDrives("/dev/disk");
|
FindDrives("/dev/disk");
|
||||||
SetDrive(0);
|
if(CountDrives()>0)
|
||||||
|
SetDrive(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
CDAudioDevice::~CDAudioDevice(void)
|
CDAudioDevice::~CDAudioDevice(void)
|
||||||
|
|||||||
@@ -56,6 +56,16 @@ CDPlayer::CDPlayer(BRect frame, const char *name, uint32 resizeMask, uint32 flag
|
|||||||
engine = new CDEngine;
|
engine = new CDEngine;
|
||||||
|
|
||||||
BuildGUI();
|
BuildGUI();
|
||||||
|
|
||||||
|
CDAudioDevice cd;
|
||||||
|
if(cd.CountDrives()<1)
|
||||||
|
{
|
||||||
|
BAlert *alert = new BAlert("CDPlayer","It appears that there are no CD drives on your"
|
||||||
|
"computer or there is no system software to support one."
|
||||||
|
" Sorry.","OK");
|
||||||
|
alert->Go();
|
||||||
|
be_app->PostMessage(B_QUIT_REQUESTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CDPlayer::~CDPlayer()
|
CDPlayer::~CDPlayer()
|
||||||
|
|||||||
Reference in New Issue
Block a user