Merge pull request #8477 from jordan-woyak/accel-indicator-flip

DolphinQt: Fix accelerometer mapping indicator flipped X axis.
This commit is contained in:
Mat M 2019-11-17 18:35:49 -05:00 committed by GitHub
commit 162b7c2ca3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -716,8 +716,8 @@ void AccelerometerMappingIndicator::paintEvent(QPaintEvent*)
p.setPen(GetBBoxPen());
p.drawRect(-scale - 1, -scale - 1, scale * 2 + 1, scale * 2 + 1);
// UI y-axis is opposite that of acceleration Z.
p.scale(1.0, -1.0);
// UI axes are opposite that of Wii remote accelerometer.
p.scale(-1.0, -1.0);
// Enable AA after drawing bounding box.
p.setRenderHint(QPainter::Antialiasing, true);
@ -780,7 +780,7 @@ void AccelerometerMappingIndicator::paintEvent(QPaintEvent*)
// G-force text:
p.setPen(GetTextColor());
p.scale(1.0, -1.0);
p.scale(-1.0, -1.0);
p.drawText(QRectF(-2, 0, scale, scale), Qt::AlignBottom | Qt::AlignRight,
QString::fromStdString(
// i18n: "g" is the symbol for "gravitational force equivalent" (g-force).