Fixed some compile-breaking bugs.

This commit is contained in:
OBattler
2018-10-26 04:54:04 +02:00
parent 473b71436d
commit 96b894f7b8
3 changed files with 11 additions and 14 deletions

View File

@@ -8,7 +8,7 @@
*
* 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>
*
@@ -202,7 +202,7 @@ cdrom_global_init(void)
static void
cdrom_drive_reset(cdrom_t *dev)
{
dev->p = NULL;
dev->priv = NULL;
dev->insert = NULL;
dev->close = NULL;
dev->get_volume = NULL;
@@ -262,9 +262,9 @@ cdrom_close(void)
dev->ops = NULL;
if (dev->close)
dev->close(dev->p);
dev->close(dev->priv);
dev->p = NULL;
dev->priv = NULL;
cdrom_drive_reset(dev);
}
@@ -279,7 +279,7 @@ cdrom_insert(uint8_t id)
if (dev->bus_type) {
if (dev->insert)
dev->insert(dev->p);
dev->insert(dev->priv);
}
}

View File

@@ -9,7 +9,7 @@
* Implementation of the CD-ROM drive with SCSI(-like)
* 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>
*
@@ -372,9 +372,6 @@ scsi_cdrom_init(scsi_cdrom_t *dev)
if (!dev)
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). */
scsi_cdrom_reset(dev);

View File

@@ -8,7 +8,7 @@
*
* 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/>
* Miran Grca, <mgrca8@gmail.com>
@@ -240,8 +240,8 @@ sound_cd_thread(void *param)
continue;
if (cdrom[i].get_volume) {
audio_vol_l = (float) (cdrom[i].get_volume(cdrom[i].p, 0));
audio_vol_r = (float) (cdrom[i].get_volume(cdrom[i].p, 1));
audio_vol_l = (float) (cdrom[i].get_volume(cdrom[i].priv, 0));
audio_vol_r = (float) (cdrom[i].get_volume(cdrom[i].priv, 1));
} else {
audio_vol_l = 255.0;
audio_vol_r = 255.0;
@@ -251,8 +251,8 @@ sound_cd_thread(void *param)
audio_vol_r /= 511.0;
if (cdrom[i].get_channel) {
channel_select[0] = cdrom[i].get_channel(cdrom[i].p, 0);
channel_select[1] = cdrom[i].get_channel(cdrom[i].p, 1);
channel_select[0] = cdrom[i].get_channel(cdrom[i].priv, 0);
channel_select[1] = cdrom[i].get_channel(cdrom[i].priv, 1);
} else {
channel_select[0] = 1;
channel_select[1] = 2;