/src/Core/CDROM.xs

http://github.com/PerlGameDev/SDL · Unknown · 29 lines · 22 code · 7 blank · 0 comment · 0 complexity · b4c530dfc8534cccc5ff6936bf1c9f24 MD5 · raw file

  1. #include "EXTERN.h"
  2. #include "perl.h"
  3. #include "XSUB.h"
  4. #include "ppport.h"
  5. #ifndef aTHX_
  6. #define aTHX_
  7. #endif
  8. #include <SDL.h>
  9. MODULE = SDL::CDROM PACKAGE = SDL::CDROM PREFIX = cd_
  10. int
  11. cd_num_drives()
  12. CODE:
  13. RETVAL = SDL_CDNumDrives();
  14. OUTPUT:
  15. RETVAL
  16. char *
  17. cd_name( drive )
  18. int drive
  19. CODE:
  20. RETVAL = strdup(SDL_CDName(drive));
  21. OUTPUT:
  22. RETVAL