Fix test for 2nd analog pad

This commit is contained in:
jimmystones
2021-10-18 19:49:07 +01:00
parent 9da54f89ae
commit 4d281cf06e
2 changed files with 7 additions and 7 deletions

View File

@@ -89,7 +89,7 @@ char button_name[BUTTON_COUNT][12] = {
char button_x[BUTTON_COUNT] = {6, 2, 4, 4, 24, 22, 22, 20, 3, 23, 9, 13};
char button_y[BUTTON_COUNT] = {5, 5, 6, 4, 5, 6, 4, 5, 1, 1, 5, 5};
#define color_button_active 0xFF
#define color_button_inactive 0b10100100
#define color_button_inactive 0b11100100
char analog_offset_x[PAD_COUNT] = {1, 20};
char analog_offset_y[PAD_COUNT] = {5, 5};
@@ -443,8 +443,8 @@ void inputtester_analog()
signed char ax = analog_l[(analog_pad * 16)];
signed char ay = analog_l[(analog_pad * 16) + 8];
analog_x[analog_pad] = ax / analog_ratio;
analog_y[analog_pad] = ay / analog_ratio;
analog_x[side] = ax / analog_ratio;
analog_y[side] = ay / analog_ratio;
// Set new color
set_fgcolour(0xFF, analog_x[side] + mx, analog_y[side] + my);

View File

@@ -341,10 +341,10 @@ int main(int argc, char** argv, char** env) {
top->joystick_r_analog_0 += 1;
top->joystick_r_analog_0 -= 256;
top->joystick_l_analog_1 -= 0;
top->joystick_l_analog_1 += 512;
top->joystick_r_analog_1 = 30;
top->joystick_r_analog_1 += 512;
top->joystick_l_analog_1 += 1;
top->joystick_l_analog_1 -= 256;
top->joystick_r_analog_1 += 1;
top->joystick_r_analog_1 -= 256;
top->joystick_l_analog_2 = 40;
top->joystick_l_analog_2 += 1024;