Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
319097f5
Commit
319097f5
authored
Sep 24, 2007
by
Vitaliy Margolen
Committed by
Alexandre Julliard
Sep 25, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dinput: Move get_config_key to a common place.
parent
bb3275ce
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
16 deletions
+18
-16
device.c
dlls/dinput/device.c
+16
-0
device_private.h
dlls/dinput/device_private.h
+2
-0
joystick_linux.c
dlls/dinput/joystick_linux.c
+0
-16
No files found.
dlls/dinput/device.c
View file @
319097f5
...
...
@@ -32,6 +32,7 @@
#include "wine/unicode.h"
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "winuser.h"
#include "winerror.h"
#include "dinput.h"
...
...
@@ -216,6 +217,21 @@ void _dump_DIDATAFORMAT(const DIDATAFORMAT *df) {
}
}
/******************************************************************************
* Get a config key from either the app-specific or the default config
*/
DWORD
get_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
char
*
name
,
char
*
buffer
,
DWORD
size
)
{
if
(
appkey
&&
!
RegQueryValueExA
(
appkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
if
(
defkey
&&
!
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
return
ERROR_FILE_NOT_FOUND
;
}
/* Conversion between internal data buffer and external data buffer */
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
const
DataFormat
*
df
)
{
int
i
;
...
...
dlls/dinput/device_private.h
View file @
319097f5
...
...
@@ -72,6 +72,8 @@ struct IDirectInputDevice2AImpl
DataFormat
data_format
;
/* user data format and wine to user format converter */
};
extern
DWORD
get_config_key
(
HKEY
,
HKEY
,
const
char
*
,
char
*
,
DWORD
);
/* Routines to do DataFormat / WineFormat conversions */
extern
void
fill_DataFormat
(
void
*
out
,
const
void
*
in
,
const
DataFormat
*
df
)
;
extern
HRESULT
create_DataFormat
(
LPCDIDATAFORMAT
asked_format
,
DataFormat
*
format
);
...
...
dlls/dinput/joystick_linux.c
View file @
319097f5
...
...
@@ -263,22 +263,6 @@ static BOOL joydev_enum_deviceW(DWORD dwDevType, DWORD dwFlags, LPDIDEVICEINSTAN
}
/*
* Get a config key from either the app-specific or the default config
*/
static
inline
DWORD
get_config_key
(
HKEY
defkey
,
HKEY
appkey
,
const
char
*
name
,
char
*
buffer
,
DWORD
size
)
{
if
(
appkey
&&
!
RegQueryValueExA
(
appkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
if
(
defkey
&&
!
RegQueryValueExA
(
defkey
,
name
,
0
,
NULL
,
(
LPBYTE
)
buffer
,
&
size
))
return
0
;
return
ERROR_FILE_NOT_FOUND
;
}
/*
* Setup the dinput options.
*/
...
...
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