From 22efd363db77416a2d85da319ca1dd578c41031e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Blondon?= Date: Tue, 1 Oct 2024 22:59:45 +0200 Subject: [PATCH] More readable pad values When the SceCtrlData.Lx value changes, the length of the value can change (from 1 character to 3 characters) so the string for Ly moves to the right by one or two characters. The SceCtrlData.Lx and Ly are `unsigned char` so the value are between 0 (one character length) and 255 (3 characters length). It's more readable by fixing the size for the value to 3 characters wide so the string to Ly does not move. --- src/samples/controller/basic/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/samples/controller/basic/main.c b/src/samples/controller/basic/main.c index 6f9b3819..8e2f1666 100644 --- a/src/samples/controller/basic/main.c +++ b/src/samples/controller/basic/main.c @@ -74,8 +74,8 @@ int main(void) sceCtrlReadBufferPositive(&pad, 1); - pspDebugScreenPrintf("Analog X = %d ", pad.Lx); - pspDebugScreenPrintf("Analog Y = %d \n", pad.Ly); + pspDebugScreenPrintf("Analog X = %3d ", pad.Lx); + pspDebugScreenPrintf("Analog Y = %3d \n", pad.Ly); if (pad.Buttons != 0){ if (pad.Buttons & PSP_CTRL_SQUARE){