Skip to content

Commit 9079b66

Browse files
committed
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.
1 parent 27ac5ae commit 9079b66

File tree

1 file changed

+2
-2
lines changed
  • _includes/samples/controls

1 file changed

+2
-2
lines changed

_includes/samples/controls/main.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ int main(void)
5252
pspDebugScreenSetXY(0, 2);
5353
sceCtrlReadBufferPositive(&pad, 1);
5454

55-
printf("Analog X = %d, ", pad.Lx);
56-
printf("Analog Y = %d \n", pad.Ly);
55+
printf("Analog X = %3d, ", pad.Lx);
56+
printf("Analog Y = %3d \n", pad.Ly);
5757

5858
if (pad.Buttons != 0)
5959
{

0 commit comments

Comments
 (0)