# HG changeset patch # User Sam Lantinga # Date 1043026544 0 # Node ID 0cd6b268193bc57446dcf56cfdf587ce2268127e # Parent 969fbd4dcd4e7e15cb6ee41064b24ece11eaae2d Date: Thu, 16 Jan 2003 13:48:31 +0200 From: "Mike Gorchak" added showing of type of the track, when adding -list arg diff -r 969fbd4dcd4e -r 0cd6b268193b test/testcdrom.c --- a/test/testcdrom.c Mon Jan 20 01:08:20 2003 +0000 +++ b/test/testcdrom.c Mon Jan 20 01:35:44 2003 +0000 @@ -44,6 +44,7 @@ { int i; int m, s, f; + char* trtype; SDL_CDStatus(cdrom); printf("Drive tracks: %d\n", cdrom->numtracks); @@ -51,8 +52,20 @@ FRAMES_TO_MSF(cdrom->track[i].length, &m, &s, &f); if ( f > 0 ) ++s; - printf("\tTrack (index %d) %d: %d:%2.2d\n", i, - cdrom->track[i].id, m, s); + switch(cdrom->track[i].type) + { + case SDL_AUDIO_TRACK: + trtype="audio"; + break; + case SDL_DATA_TRACK: + trtype="data"; + break; + default: + trtype="unknown"; + break; + } + printf("\tTrack (index %d) %d: %d:%2.2d [%s track]\n", i, + cdrom->track[i].id, m, s, trtype); } }