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
034000b6
Commit
034000b6
authored
Feb 19, 2003
by
Andreas Mohr
Committed by
Alexandre Julliard
Feb 19, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Convert Twips values from the registry.
parent
6356a441
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
9 deletions
+20
-9
sysmetrics.c
windows/sysmetrics.c
+1
-1
sysparams.c
windows/sysparams.c
+19
-8
No files found.
windows/sysmetrics.c
View file @
034000b6
...
...
@@ -43,7 +43,7 @@ static int sysMetrics[SM_WINE_CMETRICS+1];
* MSDN Library - April 2001 -> Resource Kits ->
* Windows 2000 Resource Kit Reference ->
* Technical Reference to the Windows 2000 Registry ->
* HKEY_CURRENT_USE -> Control Panel -> Desktop -> WindowMetrics
* HKEY_CURRENT_USE
R
-> Control Panel -> Desktop -> WindowMetrics
*
* This is written as a function to prevent repeated evaluation of the
* argument.
...
...
windows/sysparams.c
View file @
034000b6
...
...
@@ -510,6 +510,14 @@ static void SYSPARAMS_GetGUIFont( LOGFONTA* plf )
}
}
/* copied from GetSystemMetrics()'s RegistryTwips2Pixels() */
inline
static
int
SYSPARAMS_Twips2Pixels
(
int
x
)
{
if
(
x
<
0
)
x
=
(
-
x
+
7
)
/
15
;
return
x
;
}
/***********************************************************************
* SystemParametersInfoA (USER32.@)
*
...
...
@@ -531,6 +539,8 @@ static void SYSPARAMS_GetGUIFont( LOGFONTA* plf )
* registry branch if saving is requested. Otherwise it is stored
* in temporary branch
*
* Some SPI values can also be stored as Twips values in the registry,
* don't forget the conversion!
*/
BOOL
WINAPI
SystemParametersInfoA
(
UINT
uiAction
,
UINT
uiParam
,
PVOID
pvParam
,
UINT
fWinIni
)
...
...
@@ -635,12 +645,9 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
{
char
buf
[
10
];
if
(
SYSPARAMS_Load
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
buf
))
{
int
i
=
atoi
(
buf
);
if
(
i
>
0
)
border
=
i
;
}
if
(
SYSPARAMS_Load
(
SPI_SETBORDER_REGKEY
,
SPI_SETBORDER_VALNAME
,
buf
))
border
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
spi_loaded
[
spi_idx
]
=
TRUE
;
if
(
TWEAK_WineLook
>
WIN31_LOOK
)
{
...
...
@@ -723,11 +730,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
spi_loaded
[
spi_idx
])
{
char
buf
[
10
];
int
val
;
if
(
SYSPARAMS_Load
(
SPI_ICONHORIZONTALSPACING_REGKEY
,
SPI_ICONHORIZONTALSPACING_VALNAME
,
buf
))
{
SYSMETRICS_Set
(
SM_CXICONSPACING
,
atoi
(
buf
)
);
val
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_CXICONSPACING
,
val
);
}
spi_loaded
[
spi_idx
]
=
TRUE
;
}
...
...
@@ -904,11 +913,13 @@ BOOL WINAPI SystemParametersInfoA( UINT uiAction, UINT uiParam,
if
(
!
spi_loaded
[
spi_idx
])
{
char
buf
[
10
];
int
val
;
if
(
SYSPARAMS_Load
(
SPI_ICONVERTICALSPACING_REGKEY
,
SPI_ICONVERTICALSPACING_VALNAME
,
buf
))
{
SYSMETRICS_Set
(
SM_CYICONSPACING
,
atoi
(
buf
)
);
val
=
SYSPARAMS_Twips2Pixels
(
atoi
(
buf
)
);
SYSMETRICS_Set
(
SM_CYICONSPACING
,
val
);
}
spi_loaded
[
spi_idx
]
=
TRUE
;
}
...
...
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