ANDROID: Fix cursor scaling
This commit is contained in:
parent
6c123974c0
commit
90fa5087dc
1 changed files with 8 additions and 6 deletions
|
@ -809,7 +809,12 @@ void OSystem_Android::updateScreen() {
|
||||||
GLCALL(glPopMatrix());
|
GLCALL(glPopMatrix());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int cs = _mouse_targetscale;
|
||||||
|
|
||||||
if (_show_overlay) {
|
if (_show_overlay) {
|
||||||
|
// ugly, but the modern theme sets a wacko factor, only god knows why
|
||||||
|
cs = 1;
|
||||||
|
|
||||||
GLCALL(_overlay_texture->drawTexture(0, 0,
|
GLCALL(_overlay_texture->drawTexture(0, 0,
|
||||||
_egl_surface_width,
|
_egl_surface_width,
|
||||||
_egl_surface_height));
|
_egl_surface_height));
|
||||||
|
@ -833,8 +838,8 @@ void OSystem_Android::updateScreen() {
|
||||||
xdiv(_egl_surface_height, texheight),
|
xdiv(_egl_surface_height, texheight),
|
||||||
1 << 16));
|
1 << 16));
|
||||||
|
|
||||||
GLCALL(glTranslatex(-_mouse_hotspot.x << 16,
|
GLCALL(glTranslatex((-_mouse_hotspot.x * cs) << 16,
|
||||||
-_mouse_hotspot.y << 16,
|
(-_mouse_hotspot.y * cs) << 16,
|
||||||
0));
|
0));
|
||||||
|
|
||||||
// Note the extra half texel to position the mouse in
|
// Note the extra half texel to position the mouse in
|
||||||
|
@ -843,10 +848,7 @@ void OSystem_Android::updateScreen() {
|
||||||
GLCALL(glTranslatex((mouse.x << 16) | 1 << 15,
|
GLCALL(glTranslatex((mouse.x << 16) | 1 << 15,
|
||||||
(mouse.y << 16) | 1 << 15, 0));
|
(mouse.y << 16) | 1 << 15, 0));
|
||||||
|
|
||||||
// Mouse targetscale just seems to make the cursor way
|
GLCALL(glScalex(cs << 16, cs << 16, 1 << 16));
|
||||||
// too big :/
|
|
||||||
//GLCALL(glScalex(_mouse_targetscale << 16, _mouse_targetscale << 16,
|
|
||||||
// 1 << 16));
|
|
||||||
|
|
||||||
_mouse_texture->drawTexture();
|
_mouse_texture->drawTexture();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue