[Scummvm-devel] Change to OSystem::displayMessageOnOSD() - Warning for Android and PS2 porters

Thierry Crozat criezy at scummvm.org
Tue Jun 7 00:48:31 CEST 2011


Hi Team and in particular the PS2 and Android porters,

So as mentioned in some earlier email I changed the documentation of OSystem::displayMessageOnOSD() to say it should expect the message to be encoded using the current TranslationManager charset. I modified the SDL and OpenGL implementations so that it works as expected and the BaseBackend implementation uses a GUI::TimedMessageDialog which should already work. So there are two remaining re-implementations of that function that need to be looked at:
- The Android backend that reimplement it to use a Java call (through JNIEnv) I believe.
- The PS2 backend that calls printf().

For the PS2: Why is it reimplemented from BaseBackend to use printf()? Is there a problem with the BaseBackend implementation?

For the Android backend, I think it expects a UTF-8 encoded string. There might be a way to create a jstring from other encoding. Otherwise it could be converted using libiconv I suppose. There was actually some code in TranslationManager that was using libiconv to convert strings to be printed in the console. However it has been removed since it was not needed. It might be used as an example for the Android backend to implement the conversion. Or it could be brought back in TranslationManager but I am reluctant to add back a dependency on libiconv there when only the Android backend might need need it.

Since I have no way to check that any change I might make would work (or even compile) on those two platforms, I will let the porters deal with it.

Thierry





More information about the Scummvm-devel mailing list