1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-18 04:23:20 +01:00

ifdef-out WinNT 6.0+ APIs (#10198)

Occasionally I need to build a binary compatible with WinNT 5.1, e.g.
when testing out Wine or ReactOS. There are just a few minor changes
required to have a working build, but as they are not part of the
repository, I always end up doing them from scratch. I would like to
upstream them instead so I don't have to recreate them each time, even
if this is not the most common use case.
This commit is contained in:
Michał Janiszewski
2019-11-08 23:16:15 +01:00
committed by GitHub
parent ffb1982d5e
commit afc92ee15a
3 changed files with 12 additions and 1 deletions

View File

@@ -706,6 +706,7 @@ namespace String
std::string ToUpper(const std::string_view& src)
{
#ifdef _WIN32
# if _WIN32_WINNT >= 0x0600
auto srcW = ToWideChar(src);
// Measure how long the destination needs to be
@@ -731,6 +732,10 @@ namespace String
{
return String::ToUtf8(dstW);
}
# else
log_warning("String::ToUpper not supported");
return std::string(src);
# endif
#else
icu::UnicodeString str = icu::UnicodeString::fromUTF8(std::string(src));
str.toUpper();