I originally wanted to add these utils into `unicode.h`, but it cannot be used with msvcrt headers.
This prompted the creation of a new header called `str.h`.
The name is generic and broad, but the file may grow to contain more general stuff in the future.
The rationale behind writing the UTF helpers is mainly to solve, at least in part, the complexity.
`WideCharToMultiByte()` and `MultiByteToWideChar()` in particular are quite dangerous as they treat the buffer size as bytes for `char` (8 bits) and as number of characters for `WCHAR` (16 bits).
There are already several wrappers around the codebase, mine should be able to replace them.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/308
Based on:
ca39b1c22dfa ("user32: Don't report mirrored slave monitors in EnumDisplayMonitors.")
2affb854e524 ("user32: Change slave to a more neutral word.")
Which seems to got lost during:
318673405c62 ("win32u: Move NtUserEnumDisplayMonitors implementation from user32.")
Fixes regression with Elite Dangerous launcher freezing when cloned
displays are present.
Signed-off-by: Arkadiusz Hiler <ahiler(a)codeweavers.com>
CC: @zhiyi @jacek
--
v3: win32u: Don't report cloned monitors in EnumDisplayMonitors().
https://gitlab.winehq.org/wine/wine/-/merge_requests/303