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
783d7136
Commit
783d7136
authored
Nov 12, 2020
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Nov 12, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wintab32: Use wide-char string literals.
Signed-off-by:
Michael Stefaniuc
<
mstefani@winehq.org
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6e8af61f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
19 deletions
+7
-19
wintab32.c
dlls/wintab32/wintab32.c
+7
-19
No files found.
dlls/wintab32/wintab32.c
View file @
783d7136
...
@@ -34,8 +34,6 @@
...
@@ -34,8 +34,6 @@
WINE_DEFAULT_DEBUG_CHANNEL
(
wintab32
);
WINE_DEFAULT_DEBUG_CHANNEL
(
wintab32
);
HWND
hwndDefault
=
NULL
;
HWND
hwndDefault
=
NULL
;
static
const
WCHAR
WC_TABLETCLASSNAME
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
't'
,
'C'
,
'l'
,
'a'
,
's'
,
's'
,
0
};
static
CRITICAL_SECTION_DEBUG
csTablet_debug
=
static
CRITICAL_SECTION_DEBUG
csTablet_debug
=
{
{
0
,
0
,
&
csTablet
,
0
,
0
,
&
csTablet
,
...
@@ -62,34 +60,26 @@ static VOID TABLET_Register(void)
...
@@ -62,34 +60,26 @@ static VOID TABLET_Register(void)
wndClass
.
cbWndExtra
=
0
;
wndClass
.
cbWndExtra
=
0
;
wndClass
.
hCursor
=
NULL
;
wndClass
.
hCursor
=
NULL
;
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wndClass
.
hbrBackground
=
(
HBRUSH
)(
COLOR_WINDOW
+
1
);
wndClass
.
lpszClassName
=
WC_TABLETCLASSNAME
;
wndClass
.
lpszClassName
=
L"WineTabletClass"
;
RegisterClassW
(
&
wndClass
);
RegisterClassW
(
&
wndClass
);
}
}
static
VOID
TABLET_Unregister
(
void
)
static
VOID
TABLET_Unregister
(
void
)
{
{
UnregisterClassW
(
WC_TABLETCLASSNAME
,
NULL
);
UnregisterClassW
(
L"WineTabletClass"
,
NULL
);
}
}
static
HMODULE
load_graphics_driver
(
void
)
static
HMODULE
load_graphics_driver
(
void
)
{
{
static
const
WCHAR
display_device_guid_propW
[]
=
{
static
const
WCHAR
key_pathW
[]
=
L"System
\\
CurrentControlSet
\\
Control
\\
Video
\\
{"
;
'_'
,
'_'
,
'w'
,
'i'
,
'n'
,
'e'
,
'_'
,
'd'
,
'i'
,
's'
,
'p'
,
'l'
,
'a'
,
'y'
,
'_'
,
static
const
WCHAR
displayW
[]
=
L"}
\\
0000"
;
'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
;
HMODULE
ret
=
0
;
HKEY
hkey
;
HKEY
hkey
;
DWORD
size
;
DWORD
size
;
WCHAR
path
[
MAX_PATH
];
WCHAR
path
[
MAX_PATH
];
WCHAR
key
[
ARRAY_SIZE
(
key_pathW
)
+
ARRAY_SIZE
(
displayW
)
+
40
];
WCHAR
key
[
ARRAY_SIZE
(
key_pathW
)
+
ARRAY_SIZE
(
displayW
)
+
40
];
UINT
guid_atom
=
HandleToULong
(
GetPropW
(
GetDesktopWindow
(),
display_device_guid_propW
));
UINT
guid_atom
=
HandleToULong
(
GetPropW
(
GetDesktopWindow
(),
L"__wine_display_device_guid"
));
if
(
!
guid_atom
)
return
0
;
if
(
!
guid_atom
)
return
0
;
memcpy
(
key
,
key_pathW
,
sizeof
(
key_pathW
)
);
memcpy
(
key
,
key_pathW
,
sizeof
(
key_pathW
)
);
...
@@ -97,7 +87,7 @@ static HMODULE load_graphics_driver(void)
...
@@ -97,7 +87,7 @@ static HMODULE load_graphics_driver(void)
lstrcatW
(
key
,
displayW
);
lstrcatW
(
key
,
displayW
);
if
(
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
key
,
&
hkey
))
return
0
;
if
(
RegOpenKeyW
(
HKEY_LOCAL_MACHINE
,
key
,
&
hkey
))
return
0
;
size
=
sizeof
(
path
);
size
=
sizeof
(
path
);
if
(
!
RegQueryValueExW
(
hkey
,
driverW
,
NULL
,
NULL
,
(
BYTE
*
)
path
,
&
size
))
ret
=
LoadLibraryW
(
path
);
if
(
!
RegQueryValueExW
(
hkey
,
L"GraphicsDriver"
,
NULL
,
NULL
,
(
BYTE
*
)
path
,
&
size
))
ret
=
LoadLibraryW
(
path
);
RegCloseKey
(
hkey
);
RegCloseKey
(
hkey
);
TRACE
(
"%s %p
\n
"
,
debugstr_w
(
path
),
ret
);
TRACE
(
"%s %p
\n
"
,
debugstr_w
(
path
),
ret
);
return
ret
;
return
ret
;
...
@@ -105,8 +95,6 @@ static HMODULE load_graphics_driver(void)
...
@@ -105,8 +95,6 @@ static HMODULE load_graphics_driver(void)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpReserved
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstDLL
,
DWORD
fdwReason
,
LPVOID
lpReserved
)
{
{
static
const
WCHAR
name
[]
=
{
'T'
,
'a'
,
'b'
,
'l'
,
'e'
,
't'
,
0
};
TRACE
(
"%p, %x, %p
\n
"
,
hInstDLL
,
fdwReason
,
lpReserved
);
TRACE
(
"%p, %x, %p
\n
"
,
hInstDLL
,
fdwReason
,
lpReserved
);
switch
(
fdwReason
)
switch
(
fdwReason
)
{
{
...
@@ -114,7 +102,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
...
@@ -114,7 +102,7 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
TRACE
(
"Initialization
\n
"
);
TRACE
(
"Initialization
\n
"
);
DisableThreadLibraryCalls
(
hInstDLL
);
DisableThreadLibraryCalls
(
hInstDLL
);
TABLET_Register
();
TABLET_Register
();
hwndDefault
=
CreateWindowW
(
WC_TABLETCLASSNAME
,
name
,
hwndDefault
=
CreateWindowW
(
L"WineTabletClass"
,
L"Tablet"
,
WS_POPUPWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
hInstDLL
,
0
);
WS_POPUPWINDOW
,
0
,
0
,
0
,
0
,
0
,
0
,
hInstDLL
,
0
);
if
(
hwndDefault
)
if
(
hwndDefault
)
{
{
...
...
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