Fixed building under Linux
Linux GUI brought up to date
This commit is contained in:
parent
47ce7bda99
commit
fb3d3d594b
7 changed files with 267 additions and 108 deletions
|
|
@ -417,14 +417,16 @@ static void ioctl_load(void)
|
|||
cdrom_capacity = ioctl_get_last_block(0, 0, 4096, 0);
|
||||
}
|
||||
|
||||
static void ioctl_readsector(uint8_t *b, int sector)
|
||||
static int ioctl_readsector(uint8_t *b, int sector)
|
||||
{
|
||||
int cdrom = open("/dev/cdrom", O_RDONLY|O_NONBLOCK);
|
||||
if (cdrom <= 0)
|
||||
return;
|
||||
return -1;
|
||||
lseek(cdrom, sector*2048, SEEK_SET);
|
||||
read(cdrom, b, 2048);
|
||||
close(cdrom);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
union
|
||||
|
|
@ -683,6 +685,11 @@ void ioctl_reset()
|
|||
close(fd);
|
||||
}
|
||||
|
||||
void ioctl_set_drive(char d)
|
||||
{
|
||||
atapi=&ioctl_atapi;
|
||||
}
|
||||
|
||||
int ioctl_open(char d)
|
||||
{
|
||||
atapi=&ioctl_atapi;
|
||||
|
|
|
|||
Loading…
Reference in a new issue