Fix macOS pixel ratio detection
This commit is contained in:
parent
045eec282a
commit
5d97e44279
2 changed files with 3 additions and 2 deletions
|
@ -144,8 +144,8 @@ QByteArray GRenderWindow::saveGeometry() {
|
|||
}
|
||||
|
||||
qreal GRenderWindow::windowPixelRatio() const {
|
||||
// windowHandle() might not be accessible until the window is displayed to screen.
|
||||
return windowHandle() ? windowHandle()->screen()->devicePixelRatio() : 1.0f;
|
||||
// QOpenGLWidget isn't backed by a native window, so we need to use the top level window instead
|
||||
return QApplication::activeWindow()->devicePixelRatio();
|
||||
}
|
||||
|
||||
std::pair<u32, u32> GRenderWindow::ScaleTouch(const QPointF pos) const {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue