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
598b52ce
Commit
598b52ce
authored
Aug 28, 2018
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Aug 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dpnet: Implement IDirectPlay8Client SetSPCaps.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5d66862e
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
3 deletions
+41
-3
client.c
dlls/dpnet/client.c
+11
-3
client.c
dlls/dpnet/tests/client.c
+30
-0
No files found.
dlls/dpnet/client.c
View file @
598b52ce
...
...
@@ -309,9 +309,17 @@ static HRESULT WINAPI IDirectPlay8ClientImpl_SetCaps(IDirectPlay8Client *iface,
static
HRESULT
WINAPI
IDirectPlay8ClientImpl_SetSPCaps
(
IDirectPlay8Client
*
iface
,
const
GUID
*
const
pguidSP
,
const
DPN_SP_CAPS
*
const
pdpspCaps
,
const
DWORD
dwFlags
)
{
IDirectPlay8ClientImpl
*
This
=
impl_from_IDirectPlay8Client
(
iface
);
FIXME
(
"(%p):(%x): Stub
\n
"
,
This
,
dwFlags
);
return
DPN_OK
;
IDirectPlay8ClientImpl
*
This
=
impl_from_IDirectPlay8Client
(
iface
);
TRACE
(
"(%p)->(%p,%p,%x): stub
\n
"
,
iface
,
pguidSP
,
pdpspCaps
,
dwFlags
);
if
(
!
This
->
msghandler
||
pdpspCaps
->
dwSize
!=
sizeof
(
DPN_SP_CAPS
))
return
DPNERR_INVALIDPARAM
;
/* Only dwSystemBufferSize is set by this call. */
This
->
spcaps
.
dwSystemBufferSize
=
pdpspCaps
->
dwSystemBufferSize
;
return
DPN_OK
;
}
static
HRESULT
WINAPI
IDirectPlay8ClientImpl_GetSPCaps
(
IDirectPlay8Client
*
iface
,
...
...
dlls/dpnet/tests/client.c
View file @
598b52ce
...
...
@@ -140,6 +140,9 @@ static BOOL test_init_dp(void)
hr
=
IDirectPlay8Client_Initialize
(
client
,
NULL
,
NULL
,
0
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"got %x
\n
"
,
hr
);
hr
=
IDirectPlay8Client_SetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPNERR_INVALIDPARAM
,
"SetSPCaps failed with %x
\n
"
,
hr
);
hr
=
IDirectPlay8Client_Initialize
(
client
,
NULL
,
DirectPlayMessageHandler
,
0
);
ok
(
hr
==
S_OK
,
"IDirectPlay8Client_Initialize failed with %x
\n
"
,
hr
);
...
...
@@ -415,6 +418,33 @@ static void test_get_sp_caps(void)
ok
(
caps
.
dwBuffersPerThread
==
1
,
"expected 1, got %d
\n
"
,
caps
.
dwBuffersPerThread
);
ok
(
caps
.
dwSystemBufferSize
==
0x10000
||
broken
(
caps
.
dwSystemBufferSize
==
0x2000
/* before Win8 */
),
"expected 0x10000, got 0x%x
\n
"
,
caps
.
dwSystemBufferSize
);
caps
.
dwNumThreads
=
2
;
caps
.
dwDefaultEnumCount
=
3
;
caps
.
dwDefaultEnumRetryInterval
=
1400
;
caps
.
dwDefaultEnumTimeout
=
1400
;
caps
.
dwMaxEnumPayloadSize
=
900
;
caps
.
dwBuffersPerThread
=
2
;
caps
.
dwSystemBufferSize
=
0x0ffff
;
hr
=
IDirectPlay8Client_SetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPN_OK
,
"SetSPCaps failed with %x
\n
"
,
hr
);
hr
=
IDirectPlay8Client_GetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPN_OK
,
"GetSPCaps failed with %x
\n
"
,
hr
);
ok
(
caps
.
dwSize
==
sizeof
(
DPN_SP_CAPS
),
"got %d
\n
"
,
caps
.
dwSize
);
ok
(
caps
.
dwNumThreads
>=
3
,
"got %d
\n
"
,
caps
.
dwNumThreads
);
ok
(
caps
.
dwDefaultEnumCount
==
5
,
"expected 5, got %d
\n
"
,
caps
.
dwDefaultEnumCount
);
ok
(
caps
.
dwDefaultEnumRetryInterval
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumRetryInterval
);
ok
(
caps
.
dwDefaultEnumTimeout
==
1500
,
"expected 1500, got %d
\n
"
,
caps
.
dwDefaultEnumTimeout
);
ok
(
caps
.
dwMaxEnumPayloadSize
==
983
,
"expected 983, got %d
\n
"
,
caps
.
dwMaxEnumPayloadSize
);
ok
(
caps
.
dwBuffersPerThread
==
1
,
"expected 1, got %d
\n
"
,
caps
.
dwBuffersPerThread
);
ok
(
caps
.
dwSystemBufferSize
==
0x0ffff
,
"expected 0x0ffff, got 0x%x
\n
"
,
caps
.
dwSystemBufferSize
);
/* Reset the System setting back to its default. */
caps
.
dwSystemBufferSize
=
0x10000
;
hr
=
IDirectPlay8Client_SetSPCaps
(
client
,
&
CLSID_DP8SP_TCPIP
,
&
caps
,
0
);
ok
(
hr
==
DPN_OK
,
"SetSPCaps failed with %x
\n
"
,
hr
);
}
static
void
test_lobbyclient
(
void
)
...
...
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