src/cdrom/win32/SDL_syscdrom.c
changeset 1524 38a12fd1a2c1
parent 1456 84de7511f79f
child 1635 92947e3a18db
equal deleted inserted replaced
1523:21b1fbb53f4a 1524:38a12fd1a2c1
   214 			if ( SDL_SYS_CDioctl(cdrom->id, MCI_STATUS, flags,
   214 			if ( SDL_SYS_CDioctl(cdrom->id, MCI_STATUS, flags,
   215 							&mci_status) == 0 ) {
   215 							&mci_status) == 0 ) {
   216 				cdrom->track[i - 1].length = MSF_TO_FRAMES(
   216 				cdrom->track[i - 1].length = MSF_TO_FRAMES(
   217 					MCI_MSF_MINUTE(mci_status.dwReturn),
   217 					MCI_MSF_MINUTE(mci_status.dwReturn),
   218 					MCI_MSF_SECOND(mci_status.dwReturn),
   218 					MCI_MSF_SECOND(mci_status.dwReturn),
   219 					MCI_MSF_FRAME(mci_status.dwReturn)) + 1; /* +1 to fix */
   219 					MCI_MSF_FRAME(mci_status.dwReturn));
   220 											/* MCI last track length bug */
       
   221 				/* compute lead-out offset */
   220 				/* compute lead-out offset */
   222 				cdrom->track[i].offset = cdrom->track[i - 1].offset +
   221 				cdrom->track[i].offset = cdrom->track[i - 1].offset +
   223 					cdrom->track[i - 1].length;
   222 					cdrom->track[i - 1].length;
   224 				cdrom->track[i].length = 0;
   223 				cdrom->track[i].length = 0;
   225 				okay = 1;
   224 				okay = 1;