Fixed some compile-breaking bugs.
This commit is contained in:
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Generic CD-ROM drive core.
|
* Generic CD-ROM drive core.
|
||||||
*
|
*
|
||||||
* Version: @(#)cdrom.c 1.0.4 2018/10/26
|
* Version: @(#)cdrom.c 1.0.5 2018/10/26
|
||||||
*
|
*
|
||||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||||
*
|
*
|
||||||
@@ -202,7 +202,7 @@ cdrom_global_init(void)
|
|||||||
static void
|
static void
|
||||||
cdrom_drive_reset(cdrom_t *dev)
|
cdrom_drive_reset(cdrom_t *dev)
|
||||||
{
|
{
|
||||||
dev->p = NULL;
|
dev->priv = NULL;
|
||||||
dev->insert = NULL;
|
dev->insert = NULL;
|
||||||
dev->close = NULL;
|
dev->close = NULL;
|
||||||
dev->get_volume = NULL;
|
dev->get_volume = NULL;
|
||||||
@@ -262,9 +262,9 @@ cdrom_close(void)
|
|||||||
dev->ops = NULL;
|
dev->ops = NULL;
|
||||||
|
|
||||||
if (dev->close)
|
if (dev->close)
|
||||||
dev->close(dev->p);
|
dev->close(dev->priv);
|
||||||
|
|
||||||
dev->p = NULL;
|
dev->priv = NULL;
|
||||||
|
|
||||||
cdrom_drive_reset(dev);
|
cdrom_drive_reset(dev);
|
||||||
}
|
}
|
||||||
@@ -279,7 +279,7 @@ cdrom_insert(uint8_t id)
|
|||||||
|
|
||||||
if (dev->bus_type) {
|
if (dev->bus_type) {
|
||||||
if (dev->insert)
|
if (dev->insert)
|
||||||
dev->insert(dev->p);
|
dev->insert(dev->priv);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -9,7 +9,7 @@
|
|||||||
* Implementation of the CD-ROM drive with SCSI(-like)
|
* Implementation of the CD-ROM drive with SCSI(-like)
|
||||||
* commands, for both ATAPI and SCSI usage.
|
* commands, for both ATAPI and SCSI usage.
|
||||||
*
|
*
|
||||||
* Version: @(#)scsi_cdrom.c 1.0.57 2018/10/26
|
* Version: @(#)scsi_cdrom.c 1.0.58 2018/10/26
|
||||||
*
|
*
|
||||||
* Author: Miran Grca, <mgrca8@gmail.com>
|
* Author: Miran Grca, <mgrca8@gmail.com>
|
||||||
*
|
*
|
||||||
@@ -372,9 +372,6 @@ scsi_cdrom_init(scsi_cdrom_t *dev)
|
|||||||
if (!dev)
|
if (!dev)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* Tell the scsi_cdrom_t struct what cdrom element corresponds to it. */
|
|
||||||
dev->drv = &(cdrom[dev->id]);
|
|
||||||
|
|
||||||
/* Do a reset (which will also rezero it). */
|
/* Do a reset (which will also rezero it). */
|
||||||
scsi_cdrom_reset(dev);
|
scsi_cdrom_reset(dev);
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* Sound emulation core.
|
* Sound emulation core.
|
||||||
*
|
*
|
||||||
* Version: @(#)sound.c 1.0.23 2018/10/26
|
* Version: @(#)sound.c 1.0.24 2018/10/26
|
||||||
*
|
*
|
||||||
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
* Authors: Sarah Walker, <http://pcem-emulator.co.uk/>
|
||||||
* Miran Grca, <mgrca8@gmail.com>
|
* Miran Grca, <mgrca8@gmail.com>
|
||||||
@@ -240,8 +240,8 @@ sound_cd_thread(void *param)
|
|||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (cdrom[i].get_volume) {
|
if (cdrom[i].get_volume) {
|
||||||
audio_vol_l = (float) (cdrom[i].get_volume(cdrom[i].p, 0));
|
audio_vol_l = (float) (cdrom[i].get_volume(cdrom[i].priv, 0));
|
||||||
audio_vol_r = (float) (cdrom[i].get_volume(cdrom[i].p, 1));
|
audio_vol_r = (float) (cdrom[i].get_volume(cdrom[i].priv, 1));
|
||||||
} else {
|
} else {
|
||||||
audio_vol_l = 255.0;
|
audio_vol_l = 255.0;
|
||||||
audio_vol_r = 255.0;
|
audio_vol_r = 255.0;
|
||||||
@@ -251,8 +251,8 @@ sound_cd_thread(void *param)
|
|||||||
audio_vol_r /= 511.0;
|
audio_vol_r /= 511.0;
|
||||||
|
|
||||||
if (cdrom[i].get_channel) {
|
if (cdrom[i].get_channel) {
|
||||||
channel_select[0] = cdrom[i].get_channel(cdrom[i].p, 0);
|
channel_select[0] = cdrom[i].get_channel(cdrom[i].priv, 0);
|
||||||
channel_select[1] = cdrom[i].get_channel(cdrom[i].p, 1);
|
channel_select[1] = cdrom[i].get_channel(cdrom[i].priv, 1);
|
||||||
} else {
|
} else {
|
||||||
channel_select[0] = 1;
|
channel_select[0] = 1;
|
||||||
channel_select[1] = 2;
|
channel_select[1] = 2;
|
||||||
|
Reference in New Issue
Block a user