Assigning a pointer to std::string appears to only perform a copy and
does not transfer ownership of the pointer, thus the allocated memory is
will never be freed. Use StringBuilder::GetStdString() to avoid the
memory leak.
Assigning a pointer to std::string appears to only perform a copy and
does not transfer ownership of the pointer, thus the allocated memory is
will never be freed.
Implement a method to construct an std::string from a StringBuilder to
avoid memory leaks when retreiving the contents of a StringBuilder and
storing it in a std::string.
Assigning a pointer to std::string appears to only perform a copy and
does not transfer ownership of the pointer, thus the allocated memory is
will never be freed. Use IStream::ReadStdString instead to return a
std::string directly, thus transferring ownership correctly.
It has been reported that Windows Vista crashes in LCMapStringEx when
using LOCALE_NAME_INVARIANT even though it is documented as supported.
As a counter measure, use LOCALE_NAME_USER_DEFAULT for the time being.
When ICU is installed separately from the system and paths configured in
CMake then the detected include directories should also be used for
compilation instead of blindly using unconfigured system includes.
SYSTEM flag ignores suggest-override warnings in ICU headers.
On first launch of the game, OpenRCT2 tries to find Gnome or KDE eyecandy dialog programs zenity and kdialog to inform the user to set the `game_path`. It will fall back to an SDL popup with manual instructions if neither is found, which looks fine. However, if OpenRCT2 is launched from the command line, which will print "file not found" errors if you don't have zenity and/or kdialog installed, which might potentially confuse the user.
This patch routes the error messages to `/dev/null`, as we don't really care if those programs are not found.
See this thread on the OpenBSD mailing list: https://marc.info/?l=openbsd-ports&m=153020454402268&w=2
While OpenRCT2 already had code to look up the Steam path on macOS and Linux, it didn't look in the correct directory. This meant that it wouldn't detect the presence of RCT2, even if the user had downloaded it via the Steam Console.
SDL_GetScancodeName doesn't actually translate the scancode to the physical key, so first we need to convert the scancode to a keycode and then turn the keycode into a string.