mirror of
https://github.com/overte-org/overte.git
synced 2025-04-23 01:13:32 +02:00
Android - Use a different variable to save the reported dpi by qt in TouchscreenVirtualPadDevice
This commit is contained in:
parent
c091bc0bb3
commit
0bb56d837d
2 changed files with 3 additions and 1 deletions
libraries/input-plugins/src/input-plugins
|
@ -43,10 +43,11 @@ void TouchscreenVirtualPadDevice::init() {
|
|||
_fixedPosition = true; // This should be config
|
||||
|
||||
QScreen* eventScreen = qApp->primaryScreen();
|
||||
if (_screenDPI != eventScreen->physicalDotsPerInch()) {
|
||||
if (_screenDPIProvided != eventScreen->physicalDotsPerInch()) {
|
||||
_screenWidthCenter = eventScreen->size().width() / 2;
|
||||
_screenDPIScale.x = (float)eventScreen->physicalDotsPerInchX();
|
||||
_screenDPIScale.y = (float)eventScreen->physicalDotsPerInchY();
|
||||
_screenDPIProvided = eventScreen->physicalDotsPerInch();
|
||||
_screenDPI = eventScreen->physicalDotsPerInch();
|
||||
|
||||
_fixedRadius = _screenDPI * 256 / 534;
|
||||
|
|
|
@ -65,6 +65,7 @@ protected:
|
|||
float _lastPinchScale;
|
||||
float _pinchScale;
|
||||
float _screenDPI;
|
||||
qreal _screenDPIProvided;
|
||||
glm::vec2 _screenDPIScale;
|
||||
bool _validTouchLeft;
|
||||
glm::vec2 _firstTouchLeftPoint;
|
||||
|
|
Loading…
Reference in a new issue