Change default mode in N64 controller range test

This commit is contained in:
sanni 2023-06-26 17:23:39 +02:00
parent 50b6540863
commit 812da38741

View File

@ -1061,7 +1061,7 @@ void nextscreen() {
} }
void controllerTest_Display() { void controllerTest_Display() {
int mode = 0; boolean cmode = 1;
//name of the current displayed result //name of the current displayed result
String anastick = ""; String anastick = "";
@ -1171,7 +1171,7 @@ void controllerTest_Display() {
display.drawStr(36, 8, "Range Test"); display.drawStr(36, 8, "Range Test");
display.drawLine(0, 9, 128, 9); display.drawLine(0, 9, 128, 9);
if (mode == 0) { if (cmode == 0) {
// Print Stick X Value // Print Stick X Value
String stickx = String("X:" + String(N64_status.stick_x, DEC) + " "); String stickx = String("X:" + String(N64_status.stick_x, DEC) + " ");
printSTR(stickx, 22 + 54, 26); printSTR(stickx, 22 + 54, 26);
@ -1195,7 +1195,7 @@ void controllerTest_Display() {
display.drawPixel(10 + xax - 68 / 4, 12 + yax + 68 / 4); display.drawPixel(10 + xax - 68 / 4, 12 + yax + 68 / 4);
//Draw Analog Stick //Draw Analog Stick
if (mode == 1) { if (cmode == 1) {
display.drawPixel(10 + xax + N64_status.stick_x / 4, 12 + yax - N64_status.stick_y / 4); display.drawPixel(10 + xax + N64_status.stick_x / 4, 12 + yax - N64_status.stick_y / 4);
//Update LCD //Update LCD
display.updateDisplay(); display.updateDisplay();
@ -1208,11 +1208,11 @@ void controllerTest_Display() {
// switch mode // switch mode
if (button == "Press a button" && lastbutton == "Z") { if (button == "Press a button" && lastbutton == "Z") {
if (mode == 0) { if (cmode == 0) {
mode = 1; cmode = 1;
display.clearDisplay(); display.clearDisplay();
} else { } else {
mode = 0; cmode = 0;
display.clearDisplay(); display.clearDisplay();
} }
} }