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
64cbea52
Commit
64cbea52
authored
Jun 18, 2008
by
Dmitry Timoshkov
Committed by
Alexandre Julliard
Jun 18, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winmm: Add the tests for mmioOpen and mmioSetBuffer, make them pass under Wine.
parent
7857cf3d
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
8 deletions
+9
-8
mmio.c
dlls/winmm/mmio.c
+9
-8
mmio.c
dlls/winmm/tests/mmio.c
+0
-0
No files found.
dlls/winmm/mmio.c
View file @
64cbea52
...
...
@@ -557,7 +557,6 @@ static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
{
TRACE
(
"(%p %p %d %u)
\n
"
,
wm
,
pchBuffer
,
cchBuffer
,
uFlags
);
if
(
uFlags
)
return
MMSYSERR_INVALPARAM
;
if
(
cchBuffer
>
0xFFFF
)
WARN
(
"Untested handling of huge mmio buffers (%d >= 64k)
\n
"
,
cchBuffer
);
...
...
@@ -571,8 +570,11 @@ static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
wm
->
info
.
dwFlags
&=
~
MMIO_ALLOCBUF
;
}
wm
->
bBufferLoaded
=
FALSE
;
if
(
pchBuffer
)
{
wm
->
info
.
pchBuffer
=
pchBuffer
;
wm
->
bBufferLoaded
=
TRUE
;
}
else
if
(
cchBuffer
)
{
if
(
!
(
wm
->
info
.
pchBuffer
=
HeapAlloc
(
GetProcessHeap
(),
0
,
cchBuffer
)))
return
MMIOERR_OUTOFMEMORY
;
...
...
@@ -586,7 +588,6 @@ static MMRESULT MMIO_SetBuffer(WINE_MMIO* wm, void* pchBuffer, LONG cchBuffer,
wm
->
info
.
pchEndRead
=
wm
->
info
.
pchBuffer
;
wm
->
info
.
pchEndWrite
=
wm
->
info
.
pchBuffer
+
cchBuffer
;
wm
->
info
.
lBufOffset
=
wm
->
info
.
lDiskOffset
;
wm
->
bBufferLoaded
=
FALSE
;
return
MMSYSERR_NOERROR
;
}
...
...
@@ -656,22 +657,22 @@ HMMIO MMIO_Open(LPSTR szFileName, MMIOINFO* refmminfo, DWORD dwOpenFlags,
wm
->
bTmpIOProc
=
TRUE
;
}
wm
->
bBufferLoaded
=
FALSE
;
wm
->
ioProc
->
count
++
;
wm
->
info
.
dwFlags
=
dwOpenFlags
;
if
(
dwOpenFlags
&
MMIO_ALLOCBUF
)
{
if
((
refmminfo
->
wErrorRet
=
MMIO_SetBuffer
(
wm
,
NULL
,
MMIO_DEFAULTBUFFER
,
0
)))
refmminfo
->
wErrorRet
=
MMIO_SetBuffer
(
wm
,
refmminfo
->
pchBuffer
,
refmminfo
->
cchBuffer
?
refmminfo
->
cchBuffer
:
MMIO_DEFAULTBUFFER
,
0
);
if
(
refmminfo
->
wErrorRet
!=
MMSYSERR_NOERROR
)
goto
error1
;
}
else
if
(
wm
->
info
.
fccIOProc
==
FOURCC_MEM
)
{
}
else
{
refmminfo
->
wErrorRet
=
MMIO_SetBuffer
(
wm
,
refmminfo
->
pchBuffer
,
refmminfo
->
cchBuffer
,
0
);
if
(
refmminfo
->
wErrorRet
!=
MMSYSERR_NOERROR
)
goto
error1
;
wm
->
bBufferLoaded
=
TRUE
;
}
/* else => unbuffered, wm->info.pchBuffer == NULL */
}
/* see mmioDosIOProc for that one */
wm
->
info
.
adwInfo
[
0
]
=
refmminfo
->
adwInfo
[
0
];
wm
->
info
.
dwFlags
=
dwOpenFlags
;
/* call IO proc to actually open file */
refmminfo
->
wErrorRet
=
send_message
(
wm
->
ioProc
,
&
wm
->
info
,
MMIOM_OPEN
,
...
...
dlls/winmm/tests/mmio.c
View file @
64cbea52
This diff is collapsed.
Click to expand it.
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