mirror of
https://github.com/overte-org/overte.git
synced 2025-04-10 18:36:11 +02:00
store pointer to event->window()->screen()
save the planet!
This commit is contained in:
parent
2c56d29a68
commit
9b993b2665
1 changed files with 5 additions and 4 deletions
|
@ -76,10 +76,11 @@ void TouchscreenDevice::touchBeginEvent(const QTouchEvent* event) {
|
|||
const QTouchEvent::TouchPoint& point = event->touchPoints().at(0);
|
||||
_firstTouchVec = glm::vec2(point.pos().x(), point.pos().y());
|
||||
KeyboardMouseDevice::enableTouch(false);
|
||||
if (_screenDPI != event->window()->screen()->physicalDotsPerInch()) {
|
||||
_screenDPIScale.x = (float)event->window()->screen()->physicalDotsPerInchX();
|
||||
_screenDPIScale.y = (float)event->window()->screen()->physicalDotsPerInchY();
|
||||
_screenDPI = event->window()->screen()->physicalDotsPerInch();
|
||||
QScreen* eventScreen = event->window()->screen();
|
||||
if (_screenDPI != eventScreen->physicalDotsPerInch()) {
|
||||
_screenDPIScale.x = (float)eventScreen->physicalDotsPerInchX();
|
||||
_screenDPIScale.y = (float)eventScreen->physicalDotsPerInchY();
|
||||
_screenDPI = eventScreen->physicalDotsPerInch();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue