Fixes for building on ubuntu

This commit is contained in:
Jack Andersen 2019-11-19 05:06:03 +00:00
parent 56ecceb9b3
commit e55b6b43e3
2 changed files with 3 additions and 3 deletions

2
externals/LibCommon vendored

@ -1 +1 @@
Subproject commit 9ee4e6ac6cb1fa6b7db45099ae37026db2d2c49c Subproject commit 8524191df613b9149369ed8578a6c4ea3038552b

View File

@ -281,7 +281,7 @@ bool CGizmo::TransformFromInput(const CRay& rkRay, CCamera& rCamera)
// Calculate normalized cursor position // Calculate normalized cursor position
QPoint CursorPos = QCursor::pos(); QPoint CursorPos = QCursor::pos();
QRect Geom = QApplication::screenAt(CursorPos)->geometry(); QRect Geom = QApplication::desktop()->screenGeometry();
CVector2f MouseCoords( CVector2f MouseCoords(
(((2.f * CursorPos.x()) / Geom.width()) - 1.f), (((2.f * CursorPos.x()) / Geom.width()) - 1.f),
(1.f - ((2.f * CursorPos.y()) / Geom.height())) (1.f - ((2.f * CursorPos.y()) / Geom.height()))
@ -618,8 +618,8 @@ void CGizmo::UpdateTransform()
void CGizmo::WrapCursor() void CGizmo::WrapCursor()
{ {
QRect Geom = QApplication::desktop()->screenGeometry();
QPoint CursorPos = QCursor::pos(); QPoint CursorPos = QCursor::pos();
QRect Geom = QApplication::screenAt(CursorPos)->geometry();
// Horizontal // Horizontal
if (CursorPos.x() == Geom.width() - 1) if (CursorPos.x() == Geom.width() - 1)