mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-16 19:13:40 +01:00
UI: Color test: Make the gamma check lines one pixel at any DPI scale
pixel_in_dps_y is the inverse of a pixel's height in UI coordinates, so use the ratio of the resolutions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
679588b17e
commit
4189eb1cc6
1 file changed
+2
-1
+2
-1
@@ -997,7 +997,8 @@ void ColorTestView::Wheel(DrawBuffer *draw, float cx, float cy, float radius, ui
|
||||
// Alternating black and white pixel rows average to 50% light. Blurred (by squinting, or resampling
|
||||
// like a VR compositor's), they match 188 when averaged in linear light, 128 when averaged as encoded.
|
||||
void ColorTestView::GammaCheck(DrawBuffer *draw, std::vector<Label> &labels, float x, float y, float w, float h) {
|
||||
const float px = g_display.pixel_in_dps_y;
|
||||
// The height of a pixel in UI coordinates. Not pixel_in_dps_y, which is the inverse.
|
||||
const float px = (float)g_display.dp_yres / (float)g_display.pixel_yres;
|
||||
const int firstRow = (int)ceilf(y / px);
|
||||
const int lastRow = (int)floorf((y + h) / px);
|
||||
for (int row = firstRow; row < lastRow; row++) {
|
||||
|
||||
Reference in new issue
Block a user