From 68f7c9e9ff6e20e47733cd4140d5810858ee2c86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 8 Sep 2021 00:18:41 +0200 Subject: [PATCH 1/3] Round the location of single-pixel lines to the nearest pixel. Should hopefully help #14204. --- Common/Render/DrawBuffer.cpp | 8 ++++---- Common/Render/DrawBuffer.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/Common/Render/DrawBuffer.cpp b/Common/Render/DrawBuffer.cpp index b932c62493..e554799386 100644 --- a/Common/Render/DrawBuffer.cpp +++ b/Common/Render/DrawBuffer.cpp @@ -123,17 +123,17 @@ void DrawBuffer::Rect(float x, float y, float w, float h, uint32_t color, int al } void DrawBuffer::hLine(float x1, float y, float x2, uint32_t color) { + // Round Y to the closest full pixel, since we're making it 1-pixel-thin. + y -= fmodf(y, pixel_in_dps_y); Rect(x1, y, x2 - x1, pixel_in_dps_y, color); } void DrawBuffer::vLine(float x, float y1, float y2, uint32_t color) { + // Round X to the closest full pixel, since we're making it 1-pixel-thin. + x -= fmodf(x, pixel_in_dps_x); Rect(x, y1, pixel_in_dps_x, y2 - y1, color); } -void DrawBuffer::vLineAlpha50(float x, float y1, float y2, uint32_t color) { - Rect(x, y1, pixel_in_dps_x, y2 - y1, (color | 0xFF000000) & 0x7F000000); -} - void DrawBuffer::RectVGradient(float x, float y, float w, float h, uint32_t colorTop, uint32_t colorBottom) { V(x, y, 0, colorTop, 0, 0); V(x + w, y, 0, colorTop, 1, 0); diff --git a/Common/Render/DrawBuffer.h b/Common/Render/DrawBuffer.h index 07aa344ca7..a978b6173c 100644 --- a/Common/Render/DrawBuffer.h +++ b/Common/Render/DrawBuffer.h @@ -73,7 +73,6 @@ public: void Rect(float x, float y, float w, float h, uint32_t color, int align = ALIGN_TOPLEFT); void hLine(float x1, float y, float x2, uint32_t color); void vLine(float x, float y1, float y2, uint32_t color); - void vLineAlpha50(float x, float y1, float y2, uint32_t color); void Line(ImageID atlas_image, float x1, float y1, float x2, float y2, float thickness, uint32_t color); From 2b683ff8c7f89b9727e36ff0968983d0c04cf34f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 8 Sep 2021 00:19:18 +0200 Subject: [PATCH 2/3] Fix typo (and maybe a bug). --- UI/ControlMappingScreen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UI/ControlMappingScreen.cpp b/UI/ControlMappingScreen.cpp index 31f7fe761d..1db57b1949 100644 --- a/UI/ControlMappingScreen.cpp +++ b/UI/ControlMappingScreen.cpp @@ -130,7 +130,7 @@ void SingleControlMapper::Refresh() { std::vector mappings; KeyMap::KeyFromPspButton(pspKey_, &mappings, false); - rows_.empty(); + rows_.clear(); for (size_t i = 0; i < mappings.size(); i++) { std::string deviceName = GetDeviceName(mappings[i].deviceId); std::string keyName = KeyMap::GetKeyOrAxisName(mappings[i].keyCode); From 2a223bb91df28a9a2fb390edb979723221eead29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Wed, 8 Sep 2021 01:16:49 +0200 Subject: [PATCH 3/3] No longer need to specify build tools version, gradle now has a default. --- android/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index 45217d4303..67bb3291c5 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -45,7 +45,6 @@ android { } } compileSdkVersion 30 - buildToolsVersion '30.0.0' defaultConfig { applicationId 'org.ppsspp.ppsspp' if (androidGitVersion.name() != "unknown" && androidGitVersion.code() >= 14000000) {