Mercurial > sdl-ios-xcode
comparison src/cdrom/win32/SDL_syscdrom.c @ 1330:450721ad5436
It's now possible to build SDL without any C runtime at all on Windows,
using Visual C++ 2005
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 06 Feb 2006 08:28:51 +0000 |
parents | c9b51268668f |
children | 3692456e7b0f |
comparison
equal
deleted
inserted
replaced
1329:bc67bbf87818 | 1330:450721ad5436 |
---|---|
20 slouken@libsdl.org | 20 slouken@libsdl.org |
21 */ | 21 */ |
22 | 22 |
23 /* Functions for system-level CD-ROM audio control */ | 23 /* Functions for system-level CD-ROM audio control */ |
24 | 24 |
25 #include <stdlib.h> | 25 #include "SDL_windows.h" |
26 #include <stdio.h> | |
27 #include <windows.h> | |
28 #include <mmsystem.h> | 26 #include <mmsystem.h> |
29 | 27 |
30 #include "SDL_error.h" | 28 #include "SDL_error.h" |
31 #include "SDL_cdrom.h" | 29 #include "SDL_cdrom.h" |
30 #include "SDL_stdlib.h" | |
31 #include "SDL_string.h" | |
32 #include "SDL_syscdrom.h" | 32 #include "SDL_syscdrom.h" |
33 | 33 |
34 /* This really broken?? */ | 34 /* This really broken?? */ |
35 #define BROKEN_MCI_PAUSE /* Pausing actually stops play -- Doh! */ | 35 #define BROKEN_MCI_PAUSE /* Pausing actually stops play -- Doh! */ |
36 | 36 |
97 SDL_CDcaps.Eject = SDL_SYS_CDEject; | 97 SDL_CDcaps.Eject = SDL_SYS_CDEject; |
98 SDL_CDcaps.Close = SDL_SYS_CDClose; | 98 SDL_CDcaps.Close = SDL_SYS_CDClose; |
99 | 99 |
100 /* Scan the system for CD-ROM drives */ | 100 /* Scan the system for CD-ROM drives */ |
101 for ( i='A'; i<='Z'; ++i ) { | 101 for ( i='A'; i<='Z'; ++i ) { |
102 sprintf(drive, "%c:\\", i); | 102 snprintf(drive, SDL_arraysize(drive), "%c:\\", i); |
103 if ( GetDriveType(drive) == DRIVE_CDROM ) { | 103 if ( GetDriveType(drive) == DRIVE_CDROM ) { |
104 AddDrive(drive); | 104 AddDrive(drive); |
105 } | 105 } |
106 } | 106 } |
107 memset(SDL_mciID, 0, sizeof(SDL_mciID)); | 107 memset(SDL_mciID, 0, sizeof(SDL_mciID)); |