There was a bug when trying to convert the Hebrew string "\e0\e1\e2"
from WINDOWS-1255 to UTF-32LE, because there was a last call to
`iconv` with `NULL`s, without error checking, and buffer needed to
be extended for that last one call.
Now this call is inserted to the main `iconv` loop, with error checking.
FriBidiChar is mapped to uint32_t (from stdint.h) while U32String is
composed of uint32 (from scummsys.h/config.h). On some platforms those
two types aren't defined using the same base type (long int vs int) and
compilation errors occur.
COMMON: Use assert in debug builds to prevent bad ordering of bounds
The only macro to check against for debug vs release builds that I found is RELEASE_BUILD
Continuing the work at https://github.com/scummvm/scummvm/pull/2236,
which moved `convertBiDiString(..page)` to unicode-bidi.h,
now moving to there also the `(..lang)` flavour.
Thus, translation.h has only the SVM-GUI related function, and the
two util functions page+code are in unicode-bidi.
Added GNU FriBidi, thus allowing Hebrew (or other future RTL languages)
to be displayed correctly.
It's been implemented for all ScummVM GUI (as far as I have noticed),
and can be further used by the engines as needed.
This work is only partial, because for complete BiDI support we'll need
to mirror the widgets, and support input text areas (which currently
don't even support Hebrew text input at all).
Some changes are required in order to use this:
- Visual Studio:
-- add FriBidi lib from https://github.com/ShiftMediaProject/fribidi
(and place the files in the other libs location)
-- add fribidi.dll to the current directory
-- add fribidi.lib to VS library list
(in GUI it's: Project -> scummvm Properties -> Linker ->
input -> Additional Dependencies)
-- Add USE_FRIBIDI define
either to:
dists/msvc/ScummVM_Global.props <PreprocessorDefinitions>
or in GUI:
Project -> scummvm Properties ->
C/C++ -> Preprocessor -> Preprocessor Definitions
- GCC:
-- install FriBidi
e.g.,
Ubuntu: `apt-get install libfribidi-dev`
CentOS: `yum install fribidi-devel`
-- rerun `configure`
Some platforms should not allow quitting ScummVM. For example the Apple's
HUG for iOS state that we should "Never quit an iOS applications
programmatically". Adding the kFeatureNoQuit allows those backend
that need it to remove the possibility to quit the application.
The keyboard repeat event generator is used when building against SDL1.
Previously the repeat events would generate based on the event stream
produced by the keymapper which is not guaranteed to have matching up
and down events in the case the keymaps are changed while a key is
pressed.
Fixes#11417.
Game controller input is now enabled whenever a compatible device is
connected. The keymapper's keymaps are refreshed when a joystick is added
or removed.
Fixes#10366.