It looks like other platforms are not affected by this, at least I
wasn't able to reproduce the issue on Linux in any way.
Since branching off to the next release is very soon and we are running
out of time, I'm limiting this to Win32 in order to avoid unneccessary
breakage by only fixing _really_ affected platforms.
The SDL library handles HiDPI differently depending on the system.
On some systems, such as macOS, the drawable area and the SDL window
have a different size (the window is on low-dpi size) while on
other systems such as Windows they have the same size. Because of
that we sometimes need to scale sizes or coordinates between the
two, and sometimes we don't.
This was handled in two different ways. This commit change the code
to handle it consistently everywhere, and also should be more future
proof should SDL change the way it handles HiDPI in the future (as
we now query the size from SDL itself to find out if the scaling is
needed).
The previous implementation was already broken, since the values were never stored in the config file
since that part was already guarded by SDL_VERSION_ATLEAST.
Since we have no way to properly determine if a window is maximized or not for
SDL1, I recommend skipping this part in the compilation.
Now, the function at least works properly for SDL2 - it was broken on _both_ versions before.
Since we use the SDL_WINDOW_FULLSCREEN_DESKTOP with SDL2, we always
use the desktop resolution in fullscreen mode anyway. Cycling
through other resolutions did nothing and was confusing.
Building for Android (OpenGL) had noisy warning for hiding overloaded virtual function
Added a dummy implementation in OpenGLGraphics manager, and also for OpenGLSdlGraphicsManager it now explicitly calls the SdlGraphicsManager implementation for the void argument signature.
- Xeen's GUIError now takes in U32String
- Scumm's ValueDisplayDialog takes in U32
- Mohawk's InfoDialog & PauseDialog takes in U32
- Mohawk - in riven.cpp, Some assignment fixes
- Backends -in sdl.cpp, Remove incorrect conversion from iso8859 when setting text in clipboard
- Graphics - Add u32 strings instead of decoding each piece in format
- Where necessary as in, where translated messages are used.
- GUIErrorMessage now takes in U32String
- error messages across some engines use U32Strings. they are changed because they show a message dialog.
This commit also includes some additional major changes.
- Return U32String from TransMan getTranslation()
- Change tooltips to be U32Strings
- Remove temporary code of convertToU32String
- U32 Support various dialogs (Browser, FileBrowser, Messages, Chooser, etc)
- U32 for music plugins
- U32 for OSD messages
- Add some helper functions to ustr.cpp
- Change default tooltips from nullptr & 0 -> ""
- Some runtime exceptions may occur when changing languages due to incorrect String::Format