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
840aacc1
Commit
840aacc1
authored
May 05, 2011
by
Damjan Jovanovic
Committed by
Alexandre Julliard
May 05, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mmsystem.dll16: Fix MCI_STATUS mapping for digitalvideo.
parent
c44ab0cd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
54 additions
and
6 deletions
+54
-6
mci16.c
dlls/mmsystem.dll16/mci16.c
+54
-6
No files found.
dlls/mmsystem.dll16/mci16.c
View file @
840aacc1
...
...
@@ -128,10 +128,21 @@ 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
(
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
*
lParam
)
static
MMSYSTEM_MapType
MCI_MapMsg16To32W
(
UINT16
wDevID
,
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
*
lParam
)
{
if
(
*
lParam
==
0
)
return
MMSYSTEM_MAP_OK
;
...
...
@@ -163,7 +174,6 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR* l
/* case MCI_SETTIMECODE:*/
/* case MCI_SIGNAL:*/
case
MCI_SPIN
:
case
MCI_STATUS
:
/* FIXME: is wrong for digital video */
case
MCI_STEP
:
case
MCI_STOP
:
/* case MCI_UNDO: */
...
...
@@ -192,6 +202,31 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR* l
*
lParam
=
(
DWORD
)
mdrp32
;
}
return
MMSYSTEM_MAP_OKMEM
;
case
MCI_STATUS
:
{
if
(
MCI_get_device_type
(
wDevID
)
==
MCI_DEVTYPE_DIGITAL_VIDEO
)
{
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
);
if
(
mdsp32w
)
{
*
(
LPMCI_DGV_STATUS_PARMS16
*
)(
mdsp32w
)
=
mdsp16
;
mdsp32w
=
(
LPMCI_DGV_STATUS_PARMSW
)((
char
*
)
mdsp32w
+
sizeof
(
LPMCI_DGV_STATUS_PARMS16
));
mdsp32w
->
dwCallback
=
mdsp16
->
dwCallback
;
mdsp32w
->
dwReturn
=
mdsp16
->
dwReturn
;
mdsp32w
->
dwItem
=
mdsp16
->
dwItem
;
mdsp32w
->
dwTrack
=
mdsp16
->
dwTrack
;
if
(
dwFlags
&
MCI_DGV_STATUS_DISKSPACE
)
mdsp32w
->
lpstrDrive
=
MCI_strdupAtoW
(
MapSL
(
mdsp16
->
lpstrDrive
));
mdsp32w
->
dwReference
=
mdsp16
->
dwReference
;
*
lParam
=
(
DWORD
)
mdsp32w
;
}
else
{
return
MMSYSTEM_MAP_NOMEM
;
}
}
else
{
*
lParam
=
(
DWORD
)
MapSL
(
*
lParam
);
}
}
return
MMSYSTEM_MAP_OKMEM
;
case
MCI_WINDOW
:
{
LPMCI_OVLY_WINDOW_PARMSW
mowp32w
=
HeapAlloc
(
GetProcessHeap
(),
HEAP_ZERO_MEMORY
,
sizeof
(
MCI_OVLY_WINDOW_PARMSW
));
...
...
@@ -359,7 +394,7 @@ static MMSYSTEM_MapType MCI_MapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR* l
/**************************************************************************
* MCI_UnMapMsg16To32W [internal]
*/
static
MMSYSTEM_MapType
MCI_UnMapMsg16To32W
(
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
lParam
)
static
MMSYSTEM_MapType
MCI_UnMapMsg16To32W
(
UINT16
wDevID
,
WORD
wMsg
,
DWORD
dwFlags
,
DWORD_PTR
lParam
)
{
switch
(
wMsg
)
{
/* case MCI_CAPTURE */
...
...
@@ -385,7 +420,6 @@ static MMSYSTEM_MapType MCI_UnMapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR
/* case MCI_SETTIMECODE:*/
/* case MCI_SIGNAL:*/
case
MCI_SPIN
:
case
MCI_STATUS
:
case
MCI_STEP
:
case
MCI_STOP
:
/* case MCI_UNDO: */
...
...
@@ -407,6 +441,20 @@ static MMSYSTEM_MapType MCI_UnMapMsg16To32W(WORD wMsg, DWORD dwFlags, DWORD_PTR
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
lParam
);
}
return
MMSYSTEM_MAP_OK
;
case
MCI_STATUS
:
if
(
lParam
&&
MCI_get_device_type
(
wDevID
)
==
MCI_DEVTYPE_DIGITAL_VIDEO
)
{
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
;
mdsp16
->
dwCallback
=
mdsp32w
->
dwCallback
;
mdsp16
->
dwReturn
=
mdsp32w
->
dwReturn
;
mdsp16
->
dwItem
=
mdsp32w
->
dwItem
;
mdsp16
->
dwTrack
=
mdsp32w
->
dwTrack
;
mdsp16
->
dwReference
=
mdsp32w
->
dwReference
;
HeapFree
(
GetProcessHeap
(),
0
,
(
LPVOID
)
mdsp32w
->
lpstrDrive
);
HeapFree
(
GetProcessHeap
(),
0
,
base
);
}
return
MMSYSTEM_MAP_OK
;
case
MCI_WINDOW
:
if
(
lParam
)
{
LPMCI_OVLY_WINDOW_PARMSW
mowp32w
=
(
LPMCI_OVLY_WINDOW_PARMSW
)
lParam
;
...
...
@@ -707,7 +755,7 @@ DWORD WINAPI mciSendCommand16(UINT16 wDevID, UINT16 wMsg, DWORD dwParam1, DWORD
dwRet
=
MCIERR_INVALID_DEVICE_ID
;
switch
(
res
=
MCI_MapMsg16To32W
(
wMsg
,
dwParam1
,
&
dwParam2
))
{
switch
(
res
=
MCI_MapMsg16To32W
(
w
DevID
,
w
Msg
,
dwParam1
,
&
dwParam2
))
{
case
MMSYSTEM_MAP_MSGERROR
:
TRACE
(
"%s not handled yet
\n
"
,
MCI_MessageToString
(
wMsg
));
dwRet
=
MCIERR_DRIVER_INTERNAL
;
...
...
@@ -720,7 +768,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
(
wMsg
,
dwParam1
,
dwParam2
);
MCI_UnMapMsg16To32W
(
w
DevID
,
w
Msg
,
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