Search
lxdream.org :: lxdream/src/gdrom/gdimage.c :: diff
lxdream 0.9.1
released Jun 29
Download Now
filename src/gdrom/gdimage.c
changeset 1030:864417a57662
prev1023:264e2fd90be8
next1071:182cfe43c09e
author nkeynes
date Mon Jun 22 01:13:16 2009 +0000 (10 years ago)
permissions -rw-r--r--
last change Fix disc type breakage introduced in last refactor
file annotate diff log raw
1.1 --- a/src/gdrom/gdimage.c Mon Jun 08 04:12:21 2009 +0000
1.2 +++ b/src/gdrom/gdimage.c Mon Jun 22 01:13:16 2009 +0000
1.3 @@ -243,6 +243,24 @@
1.4 }
1.5 }
1.6
1.7 +void gdrom_set_disc_type( gdrom_disc_t disc )
1.8 +{
1.9 + int type = IDE_DISC_NONE, i;
1.10 + for( i=0; i<disc->track_count; i++ ) {
1.11 + if( disc->track[i].mode == GDROM_CDDA ) {
1.12 + if( type == IDE_DISC_NONE )
1.13 + type = IDE_DISC_AUDIO;
1.14 + } else if( disc->track[i].mode == GDROM_MODE1 || disc->track[i].mode == GDROM_RAW_NONXA ) {
1.15 + if( type != IDE_DISC_CDROMXA )
1.16 + type = IDE_DISC_CDROM;
1.17 + } else {
1.18 + type = IDE_DISC_CDROMXA;
1.19 + break;
1.20 + }
1.21 + }
1.22 + disc->disc_type = type;
1.23 +}
1.24 +
1.25 /**
1.26 * Determine the start position in a raw sector, and the amount of data to read
1.27 * in bytes, for a given combination of sector mode and read mode.
.