diff options
author | Simon Howard | 2013-10-06 14:58:44 +0000 |
---|---|---|
committer | Simon Howard | 2013-10-06 14:58:44 +0000 |
commit | 6ec6095cb127421fc648781d0820d23d6e7a58a4 (patch) | |
tree | eafd74cee78d87112b726c59d4e2f9576fb2370a /src/i_cdmus.c | |
parent | 9a4f30c23a7b87e5f5bf3e4e4039c845cba38d66 (diff) | |
download | chocolate-doom-6ec6095cb127421fc648781d0820d23d6e7a58a4.tar.gz chocolate-doom-6ec6095cb127421fc648781d0820d23d6e7a58a4.tar.bz2 chocolate-doom-6ec6095cb127421fc648781d0820d23d6e7a58a4.zip |
Finish implementation of Hexen CD audio music mode.
Subversion-branch: /branches/v2-branch
Subversion-revision: 2694
Diffstat (limited to 'src/i_cdmus.c')
-rw-r--r-- | src/i_cdmus.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/src/i_cdmus.c b/src/i_cdmus.c index 94ac47c6..d05b5bd1 100644 --- a/src/i_cdmus.c +++ b/src/i_cdmus.c @@ -42,8 +42,20 @@ int I_CDMusInit(void) { int drive_num = 0; + // The initialize function is re-invoked when the CD track play cheat + // is used, so use the opportunity to call SDL_CDStatus() to update + // the status of the drive. + // TODO: Check this actually works. + + if (cd_handle != NULL) + { + SDL_CDStatus(cd_handle); + cd_Error = 0; + return 0; + } + // TODO: config variable to control CDROM to use. - + cd_handle = SDL_CDOpen(drive_num); if (cd_handle == NULL) @@ -53,6 +65,8 @@ int I_CDMusInit(void) return -1; } + printf("I_CDMusInit: Using CD-ROM drive: %s\n", SDL_CDName(drive_num)); + if (!CD_INDRIVE(cd_handle->status)) { fprintf(stderr, "I_CDMusInit: '%s': no CD in drive.\n", @@ -139,8 +153,7 @@ int I_CDMusFirstTrack(void) } } - /* Don't know? */ - + // Don't know? cd_Error = 1; return -1; |