1
0
mirror of https://github.com/mpv-player/mpv synced 2024-12-24 15:52:25 +00:00

mingw gcc 4.1 support patch by Gianluigi Tiesi <mplayer at netfarm.it>

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@15690 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
faust3 2005-06-07 13:36:21 +00:00
parent 969ab879f4
commit 7bd96cce9e
2 changed files with 10 additions and 7 deletions

View File

@ -273,14 +273,14 @@ static int win2k_open ( dvdcss_t dvdcss, char const *psz_device )
* won't send back the right result).
* (See Microsoft Q241374: Read and Write Access Required for SCSI
* Pass Through Requests) */
(HANDLE) dvdcss->i_fd =
dvdcss->i_fd = (int)
CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE,
FILE_SHARE_READ | FILE_SHARE_WRITE,
NULL, OPEN_EXISTING,
FILE_FLAG_RANDOM_ACCESS, NULL );
if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
(HANDLE) dvdcss->i_fd =
dvdcss->i_fd = (int)
CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ,
NULL, OPEN_EXISTING,
FILE_FLAG_RANDOM_ACCESS, NULL );
@ -302,8 +302,8 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
DWORD dwSupportInfo;
struct w32_aspidev *fd;
int i, j, i_hostadapters;
long (*lpGetSupport)( void );
long (*lpSendCommand)( void* );
GETASPI32SUPPORTINFO lpGetSupport;
SENDASPI32COMMAND lpSendCommand;
char c_drive = psz_device[0];
/* load aspi and init w32_aspidev structure */
@ -314,8 +314,8 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
return -1;
}
(FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" );
(FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" );
lpGetSupport = (GETASPI32SUPPORTINFO) GetProcAddress( hASPI, "GetASPI32SupportInfo" );
lpSendCommand = (SENDASPI32COMMAND) GetProcAddress( hASPI, "SendASPI32Command" );
if(lpGetSupport == NULL || lpSendCommand == NULL )
{

View File

@ -318,6 +318,9 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
* win32 aspi specific
*****************************************************************************/
typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID);
typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID);
#define WIN2K ( GetVersion() < 0x80000000 )
#define ASPI_HAID 0
#define ASPI_TARGET 0
@ -339,7 +342,7 @@ struct w32_aspidev
long hASPI;
short i_sid;
int i_blocks;
long (*lpSendCommand)( void* );
SENDASPI32COMMAND lpSendCommand;
};
#pragma pack(1)