mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-06-06 14:43:47 +00:00
Merge branch 'master' of https://github.com/AxioDL/PrimeWorldEditor
This commit is contained in:
commit
e6bb5f32c1
2
externals/LibCommon
vendored
2
externals/LibCommon
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 8524191df613b9149369ed8578a6c4ea3038552b
|
Subproject commit 828bda48869ae3a75ae77ac690bb33dcd2ecedee
|
@ -270,17 +270,23 @@ void CBasicViewport::ProcessInput()
|
|||||||
|
|
||||||
if (IsMouseInputActive())
|
if (IsMouseInputActive())
|
||||||
{
|
{
|
||||||
|
float XMovement, YMovement;
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
// QCursor::setPos only works on macOS when the user permits PWE
|
// QCursor::setPos only works on macOS when the user permits PWE
|
||||||
// to control the computer via Universal Access.
|
// to control the computer via Universal Access.
|
||||||
// As an alternative to relying on the delta of a warped mouse,
|
// As an alternative to relying on the delta of a warped mouse,
|
||||||
// use the accumulated delta directly reported by AppKit.
|
// use the accumulated delta directly reported by AppKit.
|
||||||
float XMovement = gpMouseDragCocoaEventFilter->claimX() * 0.01f;
|
if (!AXIsProcessTrusted())
|
||||||
float YMovement = gpMouseDragCocoaEventFilter->claimY() * 0.01f;
|
{
|
||||||
#else
|
XMovement = gpMouseDragCocoaEventFilter->claimX() * 0.01f;
|
||||||
float XMovement = (QCursor::pos().x() - mLastMousePos.x()) * 0.01f;
|
YMovement = gpMouseDragCocoaEventFilter->claimY() * 0.01f;
|
||||||
float YMovement = (QCursor::pos().y() - mLastMousePos.y()) * 0.01f;
|
}
|
||||||
|
else
|
||||||
#endif
|
#endif
|
||||||
|
{
|
||||||
|
XMovement = (QCursor::pos().x() - mLastMousePos.x()) * 0.01f;
|
||||||
|
YMovement = (QCursor::pos().y() - mLastMousePos.y()) * 0.01f;
|
||||||
|
}
|
||||||
|
|
||||||
if ((XMovement != 0) || (YMovement != 0))
|
if ((XMovement != 0) || (YMovement != 0))
|
||||||
{
|
{
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
||||||
#include <CoreGraphics/CGBase.h>
|
#include <CoreGraphics/CGBase.h>
|
||||||
|
extern "C" Boolean AXIsProcessTrusted(void);
|
||||||
|
|
||||||
#include <QAbstractNativeEventFilter>
|
#include <QAbstractNativeEventFilter>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user