kFeatureFullscreenMode and kFeatureAspectRatioCorrection are supported
now. The former prevents scaling to the full display - it scales one
axis and keeps the game AR.
Same issue as in the last commit: glTexSubImage2D is slow, so cache
all copyRect*() calls in a buffer, and update the dirty rect once
when drawing. Reduces CPU usage on 16bit games significantly.
Also, lockScreen() returns now pixel data for non-CLUT8 games instead
of asserting.
Some GLES drivers suck so much that uploading data to the GPU takes
ages. CLUT8 games now use a faked paletted texture, which internally
uses a RGB565 hardware texture (Android's native pixel format).
This seems to be the only way to efficiently implement constant
changing textures with GLES1 - at the cost of extra buffers.
Then again, we can now use glTexSubImage2D to only update the dirty
rects, which wasn't possible before because glCompressedTexSubImage2D
is only usable on GLES2. This commit does exactly that.
Overall, the CPU usage is massively reduced for CLUT8 games.
Thanks to waltervn (and wjp) for their investigation on this and Walter's SCI
specific workaround which I more or less just copied here so it will apply for
all engines.
WinCE is using -O3 by default, which includes -finline-functions, which in turn
breaks SCI. By disabling that opimization we get SCI working fine again.
The OS can kill the activity at will after onPause() or onStop()
to free up memory for other application. Provide a parachute when
the engine allows it.
CursorMan allows to push cursors with a width/height of zero. If such a
cursor is restored, we don't need to call glTexSubImage2D() 0xffffffff
times... This fixes delays of multiple minutes when closing GMM
on groovie and sword.
Also, I want that last hour of my life back.
The content of a paletted texture is in _surface.pixels. When recreating
the surface, don't wipe its data unnecessarily. This fixes gfx garbage
on CLUT8 games/cursors when leaving and going back to ScummVM