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
e8f808a6
Commit
e8f808a6
authored
Aug 13, 2012
by
Lucas Zawacki
Committed by
Alexandre Julliard
Aug 14, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Semi-stub for IDirectInputJoyConfig8_GetConfig.
parent
dbc10ef9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
40 additions
and
4 deletions
+40
-4
dinput_main.c
dlls/dinput/dinput_main.c
+38
-2
dinput.c
dlls/dinput/tests/dinput.c
+2
-2
No files found.
dlls/dinput/dinput_main.c
View file @
e8f808a6
...
@@ -1142,8 +1142,44 @@ static HRESULT WINAPI JoyConfig8Impl_DeleteType(IDirectInputJoyConfig8 *iface, L
...
@@ -1142,8 +1142,44 @@ static HRESULT WINAPI JoyConfig8Impl_DeleteType(IDirectInputJoyConfig8 *iface, L
static
HRESULT
WINAPI
JoyConfig8Impl_GetConfig
(
IDirectInputJoyConfig8
*
iface
,
UINT
id
,
LPDIJOYCONFIG
info
,
DWORD
flags
)
static
HRESULT
WINAPI
JoyConfig8Impl_GetConfig
(
IDirectInputJoyConfig8
*
iface
,
UINT
id
,
LPDIJOYCONFIG
info
,
DWORD
flags
)
{
{
FIXME
(
"(%p)->(%d, %p, 0x%08x): stub!
\n
"
,
iface
,
id
,
info
,
flags
);
IDirectInputImpl
*
di
=
impl_from_IDirectInputJoyConfig8
(
iface
);
return
E_NOTIMPL
;
UINT
found
=
0
;
int
i
,
j
,
r
;
FIXME
(
"(%p)->(%d, %p, 0x%08x): semi-stub!
\n
"
,
iface
,
id
,
info
,
flags
);
#define X(x) if (flags & x) FIXME("\tflags |= "#x"\n");
X
(
DIJC_GUIDINSTANCE
)
X
(
DIJC_REGHWCONFIGTYPE
)
X
(
DIJC_GAIN
)
X
(
DIJC_CALLOUT
)
#undef X
/* Enumerate all joysticks in order */
for
(
i
=
0
;
i
<
NB_DINPUT_DEVICES
;
i
++
)
{
if
(
!
dinput_devices
[
i
]
->
enum_deviceA
)
continue
;
for
(
j
=
0
,
r
=
-
1
;
r
!=
0
;
j
++
)
{
DIDEVICEINSTANCEA
dev
;
dev
.
dwSize
=
sizeof
(
dev
);
if
((
r
=
dinput_devices
[
i
]
->
enum_deviceA
(
DI8DEVCLASS_GAMECTRL
,
0
,
&
dev
,
di
->
dwVersion
,
j
)))
{
/* Only take into account the chosen id */
if
(
found
==
id
)
{
if
(
flags
&
DIJC_GUIDINSTANCE
)
info
->
guidInstance
=
dev
.
guidInstance
;
return
DI_OK
;
}
found
+=
1
;
}
}
}
return
DIERR_NOMOREITEMS
;
}
}
static
HRESULT
WINAPI
JoyConfig8Impl_SetConfig
(
IDirectInputJoyConfig8
*
iface
,
UINT
id
,
LPCDIJOYCONFIG
info
,
DWORD
flags
)
static
HRESULT
WINAPI
JoyConfig8Impl_SetConfig
(
IDirectInputJoyConfig8
*
iface
,
UINT
id
,
LPCDIJOYCONFIG
info
,
DWORD
flags
)
...
...
dlls/dinput/tests/dinput.c
View file @
e8f808a6
...
@@ -595,11 +595,11 @@ static void test_DirectInputJoyConfig8(void)
...
@@ -595,11 +595,11 @@ static void test_DirectInputJoyConfig8(void)
{
{
hr
=
IDirectInputJoyConfig8_GetConfig
(
pDIJC
,
i
,
&
info
,
DIJC_GUIDINSTANCE
);
hr
=
IDirectInputJoyConfig8_GetConfig
(
pDIJC
,
i
,
&
info
,
DIJC_GUIDINSTANCE
);
todo_wine
ok
(
hr
==
DI_OK
||
hr
==
DIERR_NOMOREITEMS
,
ok
(
hr
==
DI_OK
||
hr
==
DIERR_NOMOREITEMS
,
"IDirectInputJoyConfig8_GetConfig returned 0x%08x
\n
"
,
hr
);
"IDirectInputJoyConfig8_GetConfig returned 0x%08x
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
if
(
SUCCEEDED
(
hr
))
todo_wine
ok
(
SUCCEEDED
(
IDirectInput_CreateDevice
(
pDI
,
&
info
.
guidInstance
,
&
pDID
,
NULL
)),
ok
(
SUCCEEDED
(
IDirectInput_CreateDevice
(
pDI
,
&
info
.
guidInstance
,
&
pDID
,
NULL
)),
"IDirectInput_CreateDevice failed with guid from GetConfig hr = 0x%08x
\n
"
,
hr
);
"IDirectInput_CreateDevice failed with guid from GetConfig hr = 0x%08x
\n
"
,
hr
);
}
}
...
...
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