ANDROID: Keep last touch mode when displaying overlay

This commit is contained in:
Le Philousophe 2021-12-25 23:26:00 +01:00
parent 523b226243
commit 92dd9c0911
8 changed files with 55 additions and 3 deletions

View file

@ -161,6 +161,25 @@ bool AndroidGraphicsManager::showMouse(bool visible) {
return last;
}
void AndroidGraphicsManager::showOverlay() {
if (_overlayVisible)
return;
_old_touch_3d_mode = JNI::getTouch3DMode();
JNI::setTouch3DMode(false);
OpenGL::OpenGLGraphicsManager::showOverlay();
}
void AndroidGraphicsManager::hideOverlay() {
if (!_overlayVisible)
return;
JNI::setTouch3DMode(_old_touch_3d_mode);
OpenGL::OpenGLGraphicsManager::hideOverlay();
}
float AndroidGraphicsManager::getHiDPIScreenFactor() const {
// TODO: Use JNI to get DisplayMetrics.density, which according to the documentation
// seems to be what we want.