Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
15a3bd9c
Commit
15a3bd9c
authored
May 11, 2011
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 12, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmsystem.dll16: Use flags instead of device type as the MCI_STATUS heuristic.
parent
8a43f353
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
17 deletions
+6
-17
mci16.c
dlls/mmsystem.dll16/mci16.c
+6
-17
No files found.
dlls/mmsystem.dll16/mci16.c
View file @
15a3bd9c
...
...
@@ -128,21 +128,10 @@ static LPWSTR MCI_strdupAtoW( LPCSTR str )
return
ret
;
}
static
DWORD
MCI_get_device_type
(
UINT16
deviceId
)
{
MCI_GETDEVCAPS_PARMS
parms
;
MCIERROR
err
;
err
=
mciSendCommandW
(
deviceId
,
MCI_GETDEVCAPS
,
MCI_GETDEVCAPS_DEVICE_TYPE
|
MCI_WAIT
,
(
DWORD_PTR
)
&
parms
);
if
(
err
!=
MMSYSERR_NOERROR
)
return
MCI_DEVTYPE_OTHER
;
return
parms
.
dwReturn
;
}
/**************************************************************************
* MCI_MapMsg16To32W [internal]
*/
static
MMSYSTEM_MapType
MCI_MapMsg16To32W
(
UINT16
wDevID
,
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
*
lParam
)
static
MMSYSTEM_MapType
MCI_MapMsg16To32W
(
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
*
lParam
)
{
if
(
*
lParam
==
0
)
return
MMSYSTEM_MAP_OK
;
...
...
@@ -204,7 +193,7 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(UINT16 wDevID, WORD wMsg, DWORD dwFlag
return
MMSYSTEM_MAP_OKMEM
;
case
MCI_STATUS
:
{
if
(
MCI_get_device_type
(
wDevID
)
==
MCI_DEVTYPE_DIGITAL_VIDEO
)
{
if
(
dwFlags
&
(
MCI_DGV_STATUS_REFERENCE
|
MCI_DGV_STATUS_DISKSPACE
)
)
{
LPMCI_DGV_STATUS_PARMSW
mdsp32w
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
LPMCI_DGV_STATUS_PARMS16
)
+
sizeof
(
MCI_DGV_STATUS_PARMSW
));
LPMCI_DGV_STATUS_PARMS16
mdsp16
=
MapSL
(
*
lParam
);
...
...
@@ -394,7 +383,7 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(UINT16 wDevID, WORD wMsg, DWORD dwFlag
/**************************************************************************
* MCI_UnMapMsg16To32W [internal]
*/
static
MMSYSTEM_MapType
MCI_UnMapMsg16To32W
(
UINT16
wDevID
,
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
lParam
)
static
MMSYSTEM_MapType
MCI_UnMapMsg16To32W
(
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
lParam
)
{
switch
(
wMsg
)
{
/* case MCI_CAPTURE */
...
...
@@ -443,7 +432,7 @@ static MMSYSTEM_MapType MCI_UnMapMsg16To32W(UINT16 wDevID, WORD wMsg, DWORD dwF
}
return
MMSYSTEM_MAP_OK
;
case
MCI_STATUS
:
if
(
lParam
&&
MCI_get_device_type
(
wDevID
)
==
MCI_DEVTYPE_DIGITAL_VIDEO
)
{
if
(
lParam
&&
(
dwFlags
&
(
MCI_DGV_STATUS_REFERENCE
|
MCI_DGV_STATUS_DISKSPACE
))
)
{
LPMCI_DGV_STATUS_PARMSW
mdsp32w
=
(
LPMCI_DGV_STATUS_PARMSW
)
lParam
;
char
*
base
=
(
char
*
)
lParam
-
sizeof
(
LPMCI_DGV_STATUS_PARMS16
);
LPMCI_DGV_STATUS_PARMS16
mdsp16
=
*
(
LPMCI_DGV_STATUS_PARMS16
*
)
base
;
...
...
@@ -759,7 +748,7 @@ DWORD WINAPI mciSendCommand16(UINT16 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
dwRet
=
MCIERR_INVALID_DEVICE_ID
;
switch
(
res
=
MCI_MapMsg16To32W
(
w
DevID
,
w
Msg
,
dwParam1
,
&
dwParam2
))
{
switch
(
res
=
MCI_MapMsg16To32W
(
wMsg
,
dwParam1
,
&
dwParam2
))
{
case
MMSYSTEM_MAP_MSGERROR
:
TRACE
(
"%s not handled yet
\n
"
,
MCI_MessageToString
(
wMsg
));
dwRet
=
MCIERR_DRIVER_INTERNAL
;
...
...
@@ -772,7 +761,7 @@ DWORD WINAPI mciSendCommand16(UINT16 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
case
MMSYSTEM_MAP_OKMEM
:
dwRet
=
mciSendCommandW
(
wDevID
,
wMsg
,
dwParam1
,
dwParam2
);
if
(
res
==
MMSYSTEM_MAP_OKMEM
)
MCI_UnMapMsg16To32W
(
w
DevID
,
w
Msg
,
dwParam1
,
dwParam2
);
MCI_UnMapMsg16To32W
(
wMsg
,
dwParam1
,
dwParam2
);
break
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment