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
312ea8e7
Commit
312ea8e7
authored
May 13, 2020
by
Jacek Caban
Committed by
Alexandre Julliard
May 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
notepad: Use int for point size value.
Signed-off-by:
Jacek Caban
<
jacek@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
7b6f6257
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
main.c
programs/notepad/main.c
+4
-3
No files found.
programs/notepad/main.c
View file @
312ea8e7
...
...
@@ -215,7 +215,8 @@ static VOID NOTEPAD_LoadSettingFromRegistry(void)
if
(
RegOpenKeyW
(
HKEY_CURRENT_USER
,
notepad_reg_key
,
&
hkey
)
==
ERROR_SUCCESS
)
{
WORD
data_helper
[
MAX_PATH
];
DWORD
type
,
data
,
size
;
DWORD
type
,
size
;
int
point_size
;
#define QUERY_NOTEPAD_REG(hkey, value_name, ret) do { DWORD type, data; DWORD size = sizeof(DWORD); if(RegQueryValueExW(hkey, value_name, 0, &type, (LPBYTE)&data, &size) == ERROR_SUCCESS) if(type == REG_DWORD) ret = data; } while(0)
QUERY_NOTEPAD_REG
(
hkey
,
value_fWrap
,
Globals
.
bWrapLongLines
);
...
...
@@ -244,10 +245,10 @@ static VOID NOTEPAD_LoadSettingFromRegistry(void)
main_rect
.
bottom
=
main_rect
.
top
+
dy
;
size
=
sizeof
(
DWORD
);
if
(
RegQueryValueExW
(
hkey
,
value_iPointSize
,
0
,
&
type
,
(
LPBYTE
)
&
data
,
&
size
)
==
ERROR_SUCCESS
)
if
(
RegQueryValueExW
(
hkey
,
value_iPointSize
,
0
,
&
type
,
(
LPBYTE
)
&
point_size
,
&
size
)
==
ERROR_SUCCESS
)
if
(
type
==
REG_DWORD
)
/* The value is stored as 10 * twips */
Globals
.
lfFont
.
lfHeight
=
-
MulDiv
(
abs
(
data
),
get_dpi
(),
720
);
Globals
.
lfFont
.
lfHeight
=
-
MulDiv
(
abs
(
point_size
),
get_dpi
(),
720
);
size
=
sizeof
(
Globals
.
lfFont
.
lfFaceName
);
if
(
RegQueryValueExW
(
hkey
,
value_lfFaceName
,
0
,
&
type
,
(
LPBYTE
)
&
data_helper
,
&
size
)
==
ERROR_SUCCESS
)
...
...
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