diff --git a/UI/GamepadEmu.cpp b/UI/GamepadEmu.cpp index 3f4da2ca57..7058fab436 100644 --- a/UI/GamepadEmu.cpp +++ b/UI/GamepadEmu.cpp @@ -208,14 +208,17 @@ void PSPDpad::Draw(UIContext &dc) { static const float yoff[4] = {0, 1, 0, -1}; static const int dir[4] = {CTRL_RIGHT, CTRL_DOWN, CTRL_LEFT, CTRL_UP}; int buttons = __CtrlPeekButtons(); + float r = D_pad_Radius * spacing_; for (int i = 0; i < 4; i++) { - float x = bounds_.centerX() + xoff[i] * D_pad_Radius * spacing_; - float y = bounds_.centerY() + yoff[i] * D_pad_Radius * spacing_; + float x = bounds_.centerX() + xoff[i] * r; + float y = bounds_.centerY() + yoff[i] * r; + float x2 = bounds_.centerX() + xoff[i] * (r + 10.f * scale_); + float y2 = bounds_.centerY() + yoff[i] * (r + 10.f * scale_); float angle = i * M_PI / 2; float imgScale = (buttons & dir[i]) ? scale_ * 2 : scale_; dc.Draw()->DrawImageRotated(arrowIndex_, x, y, imgScale, angle + PI, colorBg, false); if (overlayIndex_ != -1) - dc.Draw()->DrawImageRotated(overlayIndex_, x, y, imgScale, angle + PI, color); + dc.Draw()->DrawImageRotated(overlayIndex_, x2, y2, imgScale, angle + PI, color); } } diff --git a/UI/TouchControlLayoutScreen.cpp b/UI/TouchControlLayoutScreen.cpp index aa4b3542ce..5a08bf8413 100644 --- a/UI/TouchControlLayoutScreen.cpp +++ b/UI/TouchControlLayoutScreen.cpp @@ -127,8 +127,10 @@ public: } if (triangleVisible_) { + float y = centerY - spacing; + y -= 2.8f * scale_; dc.Draw()->DrawImageRotated(roundId_, centerX, centerY - spacing, scale_, 0, colorBg, false); - dc.Draw()->DrawImageRotated(triangleId_, centerX, centerY - spacing, scale_, 0, color, false); + dc.Draw()->DrawImageRotated(triangleId_, centerX, y, scale_, 0, color, false); } if (squareVisible_) { @@ -178,12 +180,15 @@ public: int dirImage = g_Config.iTouchButtonStyle ? I_DIR_LINE : I_DIR; for (int i = 0; i < 4; i++) { - float x = bounds_.centerX() + xoff[i] * D_pad_Radius * spacing_; - float y = bounds_.centerY() + yoff[i] * D_pad_Radius * spacing_; + float r = D_pad_Radius * spacing_; + float x = bounds_.centerX() + xoff[i] * r; + float y = bounds_.centerY() + yoff[i] * r; + float x2 = bounds_.centerX() + xoff[i] * (r + 10.f * scale_); + float y2 = bounds_.centerY() + yoff[i] * (r + 10.f * scale_); float angle = i * M_PI / 2; dc.Draw()->DrawImageRotated(dirImage, x, y, scale_, angle + PI, colorBg, false); - dc.Draw()->DrawImageRotated(I_ARROW, x, y, scale_, angle + PI, color); + dc.Draw()->DrawImageRotated(I_ARROW, x2, y2, scale_, angle + PI, color); } }