- Also insert curly-brackets for switch-case in GeneralPageProc
- Use correct printf data type for the system uptime
Reviewed-by: Stanislav Motylkov <x86corez@gmail.com>
Reviewed-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
CORE-17545
Addendum to commit d635ce0c.
dll/cpl/sysdm/general.c:156:25: warning: variable 'hCreditsDC' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (hDC == NULL)
^~~~~~~~~~~
dll/cpl/sysdm/general.c:216:25: note: uninitialized use occurs here
if (hCreditsDC != NULL) DeleteDC(hCreditsDC);
^~~~~~~~~~
and the same for hLogoDC:
dll/cpl/sysdm/general.c:215:25: note: uninitialized use occurs here
if (hLogoDC != NULL) DeleteDC(hLogoDC);
^~~~~~~
CORE-17545
Addendum to commit d635ce0c.
- Move the HDC variables initialization via function calls, out of
the variables declaration block.
- Fix warnings (and identical for base/system/userinit/livecd.c):
dll/cpl/sysdm/general.c:72:9: warning: variable 'hLogo' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
if (hDC == NULL || hDCLogo == NULL || hDCMask == NULL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dll/cpl/sysdm/general.c:130:9: note: uninitialized use occurs here
if (hLogo != NULL) DeleteObject(hLogo);
^~~~~
and similar for hMask too:
dll/cpl/sysdm/general.c:129:9: note: uninitialized use occurs here
if (hMask != NULL) DeleteObject(hMask);
^~~~~
This fixes a regression with the AlphaBlending on single left-click
on the ros logo in general tab.
That regression was introduced by
0.4.15-dev-178-g d635ce0cc0
So it can be seen as an addendum to (#2707).
We luckily did not have any affected releases yet.
The version string cutoff started to happen when we switched from SVN
with its short revision number to git with the longer hashes.
0.4.7-dev-502-gc2c66af was the first git-only rev (2017-Oct-03)
This brings the dialogs layout closer to XP.
Also fixes some other truncations for specific languages.
And unifies the touched text controls sizes for all languages.
The credits have been moved to readme.txt where they are more present and
we can avoid having to groom all languages files each time we want to add
a new dev (and sysdm.cpl to grow each time). Less maintenance.
0.4.15-dev-1629-g9aa73da gcc 8.4.0 dbg RosBE2.2.1 I18N=all binary size
sysdm.cpl before: 925.696bytes after: 705.024bytes
readme.txt still fits into a single NTFS cluster afterwards with 3702bytes
## Purpose
[SYSDM]
- When closing System Properties page, log show
(win32ss/user/ntuser/windc.c:749) err: [00060138] GetDC() without ReleaseDC()!
because GetDC() is called (multiple times) without properly calling ReleaseDC() as required in order to release a device context.
- This module also lacks some error management in case null DC are provided (on error).
- LiveCD Userinit, based on SYSDM is affected too.
[DESK]
- Fix missing ReleaseDC related to the spectrum (color depth)
## Proposed changes
- ReleaseDC() added.
- Error management in case of null DC.
- Overall alignement of LiveCD Userinit and SYSDM.