mirror of
https://github.com/mpv-player/mpv
synced 2024-12-25 16:33:02 +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:
parent
969ab879f4
commit
7bd96cce9e
@ -273,14 +273,14 @@ static int win2k_open ( dvdcss_t dvdcss, char const *psz_device )
|
|||||||
* won't send back the right result).
|
* won't send back the right result).
|
||||||
* (See Microsoft Q241374: Read and Write Access Required for SCSI
|
* (See Microsoft Q241374: Read and Write Access Required for SCSI
|
||||||
* Pass Through Requests) */
|
* Pass Through Requests) */
|
||||||
(HANDLE) dvdcss->i_fd =
|
dvdcss->i_fd = (int)
|
||||||
CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE,
|
CreateFile( psz_dvd, GENERIC_READ | GENERIC_WRITE,
|
||||||
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
FILE_SHARE_READ | FILE_SHARE_WRITE,
|
||||||
NULL, OPEN_EXISTING,
|
NULL, OPEN_EXISTING,
|
||||||
FILE_FLAG_RANDOM_ACCESS, NULL );
|
FILE_FLAG_RANDOM_ACCESS, NULL );
|
||||||
|
|
||||||
if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
|
if( (HANDLE) dvdcss->i_fd == INVALID_HANDLE_VALUE )
|
||||||
(HANDLE) dvdcss->i_fd =
|
dvdcss->i_fd = (int)
|
||||||
CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ,
|
CreateFile( psz_dvd, GENERIC_READ, FILE_SHARE_READ,
|
||||||
NULL, OPEN_EXISTING,
|
NULL, OPEN_EXISTING,
|
||||||
FILE_FLAG_RANDOM_ACCESS, NULL );
|
FILE_FLAG_RANDOM_ACCESS, NULL );
|
||||||
@ -302,8 +302,8 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
|
|||||||
DWORD dwSupportInfo;
|
DWORD dwSupportInfo;
|
||||||
struct w32_aspidev *fd;
|
struct w32_aspidev *fd;
|
||||||
int i, j, i_hostadapters;
|
int i, j, i_hostadapters;
|
||||||
long (*lpGetSupport)( void );
|
GETASPI32SUPPORTINFO lpGetSupport;
|
||||||
long (*lpSendCommand)( void* );
|
SENDASPI32COMMAND lpSendCommand;
|
||||||
char c_drive = psz_device[0];
|
char c_drive = psz_device[0];
|
||||||
|
|
||||||
/* load aspi and init w32_aspidev structure */
|
/* load aspi and init w32_aspidev structure */
|
||||||
@ -314,8 +314,8 @@ static int aspi_open( dvdcss_t dvdcss, char const * psz_device )
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
(FARPROC) lpGetSupport = GetProcAddress( hASPI, "GetASPI32SupportInfo" );
|
lpGetSupport = (GETASPI32SUPPORTINFO) GetProcAddress( hASPI, "GetASPI32SupportInfo" );
|
||||||
(FARPROC) lpSendCommand = GetProcAddress( hASPI, "SendASPI32Command" );
|
lpSendCommand = (SENDASPI32COMMAND) GetProcAddress( hASPI, "SendASPI32Command" );
|
||||||
|
|
||||||
if(lpGetSupport == NULL || lpSendCommand == NULL )
|
if(lpGetSupport == NULL || lpSendCommand == NULL )
|
||||||
{
|
{
|
||||||
|
@ -318,6 +318,9 @@ typedef struct _SCSI_PASS_THROUGH_DIRECT
|
|||||||
* win32 aspi specific
|
* win32 aspi specific
|
||||||
*****************************************************************************/
|
*****************************************************************************/
|
||||||
|
|
||||||
|
typedef WINAPI DWORD (*GETASPI32SUPPORTINFO)(VOID);
|
||||||
|
typedef WINAPI DWORD (*SENDASPI32COMMAND)(LPVOID);
|
||||||
|
|
||||||
#define WIN2K ( GetVersion() < 0x80000000 )
|
#define WIN2K ( GetVersion() < 0x80000000 )
|
||||||
#define ASPI_HAID 0
|
#define ASPI_HAID 0
|
||||||
#define ASPI_TARGET 0
|
#define ASPI_TARGET 0
|
||||||
@ -339,7 +342,7 @@ struct w32_aspidev
|
|||||||
long hASPI;
|
long hASPI;
|
||||||
short i_sid;
|
short i_sid;
|
||||||
int i_blocks;
|
int i_blocks;
|
||||||
long (*lpSendCommand)( void* );
|
SENDASPI32COMMAND lpSendCommand;
|
||||||
};
|
};
|
||||||
|
|
||||||
#pragma pack(1)
|
#pragma pack(1)
|
||||||
|
Loading…
Reference in New Issue
Block a user