Web entity
Showing the changes to interface/src/Application.cpp (1 of 22 files). Show all
Unified · Split
| @@ -341,6 +341,7 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) : · 340 unmodified lines | ||
| 341 | 341 | _domainConnectionRefusals(QList<QString>()), |
| 342 | 342 | _maxOctreePPS(maxOctreePacketsPerSecond.get()) |
| 343 | 343 | { |
| 344 | + setInstance(this); | |
| 344 | 345 | #ifdef Q_OS_WIN |
| 345 | 346 | installNativeEventFilter(&MyNativeEventFilter::getInstance()); |
| 346 | 347 | #endif |
| @@ -4692,3 +4693,8 @@ void Application::setMaxOctreePacketsPerSecond(int maxOctreePPS) { · 4345 unmodified lines | ||
| 4692 | 4693 | int Application::getMaxOctreePacketsPerSecond() { |
| 4693 | 4694 | return _maxOctreePPS; |
| 4694 | 4695 | } |
| 4696 | + | |
| 4697 | +qreal Application::getDevicePixelRatio() { | |
| 4698 | + return _window ? _window->windowHandle()->devicePixelRatio() : 1.0; | |
| 4699 | +} | |
| 4700 | + | |