mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 09:34:43 +00:00
[NTUSER] Fix SPI_SETFONTSMOOTHING behavior (#5526)
CORE-19092 Fixes the behavior of the SPI_SETFONTSMOOTHING system parameter. This also fixes a bug when trying to select "Use the following method to smooth edges of screen fonts" in desk.cpl. Instead of checking if uiParam is equal to two, treat uiParam as a Boolean that sets font smoothing on or off. This is the correct behavior according to Microsoft documentation. Use SpiStoreSzInt method instead of SpiStoreSz to store the value in the registry.
This commit is contained in:
parent
28ae9fb738
commit
c64103d55f
1 changed files with 2 additions and 2 deletions
|
@ -1404,10 +1404,10 @@ SpiGetSet(UINT uiAction, UINT uiParam, PVOID pvParam, FLONG fl)
|
|||
return SpiGetInt(pvParam, &gspv.bFontSmoothing, fl);
|
||||
|
||||
case SPI_SETFONTSMOOTHING:
|
||||
gspv.bFontSmoothing = (uiParam == 2);
|
||||
gspv.bFontSmoothing = !!uiParam;
|
||||
if (fl & SPIF_UPDATEINIFILE)
|
||||
{
|
||||
SpiStoreSz(KEY_DESKTOP, VAL_FONTSMOOTHING, (uiParam == 2) ? L"2" : L"0");
|
||||
SpiStoreSzInt(KEY_DESKTOP, VAL_FONTSMOOTHING, gspv.bFontSmoothing ? 2 : 0);
|
||||
}
|
||||
return (UINT_PTR)KEY_DESKTOP;
|
||||
|
||||
|
|
Loading…
Reference in a new issue