mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Correct inverted Y axis of new touch screen analog stick
This commit is contained in:
parent
bcfb31db28
commit
37d2b5ecbf
1 changed files with 2 additions and 2 deletions
|
@ -206,7 +206,7 @@ void PSPStick::Draw(UIContext &dc) {
|
|||
__CtrlPeekAnalog(stick_, &dx, &dy);
|
||||
|
||||
dc.Draw()->DrawImage(bgImg_, stickX, stickY, 1.0f * scale_, colorBg, ALIGN_CENTER);
|
||||
dc.Draw()->DrawImage(stickImageIndex_, stickX + dx * stick_size_ * scale_, stickY + dy * stick_size_ * scale_, 1.0f * scale_, colorBg, ALIGN_CENTER);
|
||||
dc.Draw()->DrawImage(stickImageIndex_, stickX + dx * stick_size_ * scale_, stickY - dy * stick_size_ * scale_, 1.0f * scale_, colorBg, ALIGN_CENTER);
|
||||
}
|
||||
|
||||
void PSPStick::Touch(const TouchInput &input) {
|
||||
|
@ -249,7 +249,7 @@ void PSPStick::ProcessTouch(float x, float y, bool down) {
|
|||
dy = std::min(1.0f, std::max(-1.0f, dy));
|
||||
|
||||
__CtrlSetAnalogX(dx, stick_);
|
||||
__CtrlSetAnalogY(dy, stick_);
|
||||
__CtrlSetAnalogY(-dy, stick_);
|
||||
} else {
|
||||
__CtrlSetAnalogX(0.0f, stick_);
|
||||
__CtrlSetAnalogY(0.0f, stick_);
|
||||
|
|
Loading…
Add table
Reference in a new issue