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
6fe63e74
Commit
6fe63e74
authored
Oct 22, 2013
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintab32: Retrieve the graphics driver name from the registry.
parent
d85b22cb
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
6 deletions
+36
-6
Makefile.in
dlls/wintab32/Makefile.in
+1
-1
wintab32.c
dlls/wintab32/wintab32.c
+35
-5
No files found.
dlls/wintab32/Makefile.in
View file @
6fe63e74
MODULE
=
wintab32.dll
IMPORTLIB
=
wintab32
IMPORTS
=
user32
gd
i32
IMPORTS
=
user32
advap
i32
C_SRCS
=
\
context.c
\
...
...
dlls/wintab32/wintab32.c
View file @
6fe63e74
...
...
@@ -22,13 +22,14 @@
#include "windef.h"
#include "winbase.h"
#include "winreg.h"
#include "wingdi.h"
#include "winuser.h"
#include "winerror.h"
#define NOFIX32
#include "wintab.h"
#include "wintab_internal.h"
#include "wine/
gdi_driver
.h"
#include "wine/
unicode
.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL
(
wintab32
);
...
...
@@ -71,6 +72,38 @@ static VOID TABLET_Unregister(void)
UnregisterClassW
(
WC_TABLETCLASSNAME
,
NULL
);
}
static
HMODULE
load_graphics_driver
(
void
)
{
static
const
WCHAR
display_device_guid_propW
[]
=
{
'_'
,
'_'
,
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'_'
,
'd'
,
'e'
,
'v'
,
'i'
,
'c'
,
'e'
,
'_'
,
'g'
,
'u'
,
'i'
,
'd'
,
0
};
static
const
WCHAR
key_pathW
[]
=
{
'S'
,
'y'
,
's'
,
't'
,
'e'
,
'm'
,
'\\'
,
'C'
,
'u'
,
'r'
,
'r'
,
'e'
,
'n'
,
't'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'S'
,
'e'
,
't'
,
'\\'
,
'C'
,
'o'
,
'n'
,
't'
,
'r'
,
'o'
,
'l'
,
'\\'
,
'V'
,
'i'
,
'd'
,
'e'
,
'o'
,
'\\'
,
'{'
,
0
};
static
const
WCHAR
displayW
[]
=
{
'}'
,
'\\'
,
'0'
,
'0'
,
'0'
,
'0'
,
0
};
static
const
WCHAR
driverW
[]
=
{
'G'
,
'r'
,
'a'
,
'p'
,
'h'
,
'i'
,
'c'
,
's'
,
'D'
,
'r'
,
'i'
,
'v'
,
'e'
,
'r'
,
0
};
HMODULE
ret
=
0
;
HKEY
hkey
;
DWORD
size
;
WCHAR
path
[
MAX_PATH
];
WCHAR
key
[(
sizeof
(
key_pathW
)
+
sizeof
(
displayW
))
/
sizeof
(
WCHAR
)
+
40
];
UINT
guid_atom
=
HandleToULong
(
GetPropW
(
GetDesktopWindow
(),
display_device_guid_propW
));
if
(
!
guid_atom
)
return
0
;
memcpy
(
key
,
key_pathW
,
sizeof
(
key_pathW
)
);
if
(
!
GlobalGetAtomNameW
(
guid_atom
,
key
+
strlenW
(
key
),
40
))
return
0
;
strcatW
(
key
,
displayW
);
if
(
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
key
,
&
hkey
))
return
0
;
size
=
sizeof
(
path
);
if
(
!
RegQueryValueExW
(
hkey
,
driverW
,
NULL
,
NULL
,
(
BYTE
*
)
path
,
&
size
))
ret
=
LoadLibraryW
(
path
);
RegCloseKey
(
hkey
);
TRACE
(
"%s %p
\n
"
,
debugstr_w
(
path
),
ret
);
return
ret
;
}
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpReserved
)
{
static
const
WCHAR
name
[]
=
{
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
't'
,
0
};
...
...
@@ -86,14 +119,11 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
WS_POPUPWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
hInstDLL
,
0
);
if
(
hwndDefault
)
{
HDC
hdc
=
GetDC
(
hwndDefault
);
HMODULE
module
=
__wine_get_driver_module
(
hdc
);
HMODULE
module
=
load_graphics_driver
();
pLoadTabletInfo
=
(
void
*
)
GetProcAddress
(
module
,
"LoadTabletInfo"
);
pAttachEventQueueToTablet
=
(
void
*
)
GetProcAddress
(
module
,
"AttachEventQueueToTablet"
);
pGetCurrentPacket
=
(
void
*
)
GetProcAddress
(
module
,
"GetCurrentPacket"
);
pWTInfoW
=
(
void
*
)
GetProcAddress
(
module
,
"WTInfoW"
);
ReleaseDC
(
hwndDefault
,
hdc
);
}
else
return
FALSE
;
...
...
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