* This is mainly to make it easy to drop the old GP2X into the
same codebase (I really have no desire to manage 2 sets of 99.9%
identical code ;)).
* Code paths for just one of the supported devices can be runtime
worked out or just defined for that device.
mount.sh: Fixed some small errors# ../../../../scummvm.gph
This partly fixes the OpenGL mode mess, but now OpenGL Normal and OpenGL
Conserve will feature the same semantics when aspect ratio correction is
enabled... That is still something to solve.
First step into making all state variables of the OpenGL backend private, to
help making the backend more maintainable, by disallowing subclasses to just
mess with everything...
Now subclasses will not need to worry about the scaling logic themselves, but
just need to implement setInternalMousePosition, which should handles setting
the system's mouse coordinates.
This fixes a segfault when trying to use the OpenGL backend with 16bpp games,
however this does not make Last Express nor Loom PC-Engine Japanese work for
me. They now fail with a "Pixel format not supported" error.
When doing glTexSubImage2D we do not need to assure that the source data has
the same width as the texture when we want to update the data, we just need
to assure that the width * Bpp cound matches the pitch.
If we do not do this, we might end up with a default alignment of 4, which will
fail (as in the graphics will be messed up) in case the screen resolution is
not divisible by 4.
Thanks to digitall for noticing this problem and finding out about
GL_UNPACK_ALIGNMENT.
This fixes messed up graphics, when SDL decides to add padding bytes to the
lines of an SDL_Surface. Formerly the code always calculated the pitch via
w*bpp, which of course does not work in all cases.
Sadly it seems the engines do not care whether their focus rect really fits
inside the game screen. To ease finding such instances (which might cause odd
clipping by the backend) I added a warning for them.
Rather than that I introduced a function which converts hardware screen
coordinates to overlay / game screen coordinates.
The logic which converts mouse movement events with hardware screen
coordinates to overlay / game screen coordinates is now inside notifyEvent.
This is still broken design, since one should not abuse an observer for that.