X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=pages%2FSDL-CDTrack.html-inc;h=22001e835d5d8ac4ddcf23659bec7b087ca63424;hb=d0dca2000e72d938a89961edc199154d64d92cbc;hp=aa75b60a2b44ed7003235b7b512804dc1403ad1c;hpb=55bbf7a209993f4172fd7e6555dda0947b844089;p=sdlgit%2FSDL-Site.git diff --git a/pages/SDL-CDTrack.html-inc b/pages/SDL-CDTrack.html-inc index aa75b60..22001e8 100644 --- a/pages/SDL-CDTrack.html-inc +++ b/pages/SDL-CDTrack.html-inc @@ -5,6 +5,7 @@
use SDL; +use SDL ':init'; use SDL::CDROM; - use SDL::CD; + use SDL::CD ':status'; use SDL::CDTrack; SDL::init( SDL_INIT_CDROM ); @@ -40,22 +41,34 @@ if( $drives > 0 ) { - my $CD = SDL::CD->new(0); #first drive's CD - - if( $CD != NULL) - { - if( $CD->status != CD_TRAYEMPTY ) - { - my $track = SDL::CD->track(0); - } - } - + my $CD = SDL::CD->new(0); #first drive's CD + + if($CD) + { + if( $CD->status != CD_TRAYEMPTY ) + { + my $track = SDL::CD->track(0); + } + } } - SDL::quit(); ++
The constants are not exported by default. You can export them into your namespace by doing:
+use SDL::CDTrack ':all'; ++
or access them directly:
+SDL::CDTrack::SDL_AUDIO_TRACK; ++
or by choosing the export tags below:
+Export tag: ':type'
+SDL_AUDIO_TRACK + SDL_DATA_TRACK