@@ -4211,7 +4211,7 @@ void MAKERphone::mediaApp() {
42114211 mp3player (mp3Files[index]);
42124212 }
42134213 }
4214- if (input == 1 )
4214+ else if (input == 1 )
42154215 {
42164216 while (!SD.begin (5 , SD_SCK_MHZ (8 )))
42174217 Serial.println (" SD card error" );
@@ -4223,10 +4223,13 @@ void MAKERphone::mediaApp() {
42234223 break ;
42244224 Serial.println (index);
42254225 drawJpeg (photoFiles[index], 0 , 0 );
4226- while (!buttons.released (BTN_A))
4226+ while (!buttons.released (BTN_A) && !buttons. released (BTN_B) )
42274227 update ();
42284228 }
4229+ while (!update ());
42294230 }
4231+ else if (input == -1 )
4232+ break ;
42304233 }
42314234}
42324235void MAKERphone::drawJpeg (String filename, int xpos, int ypos) {
@@ -4664,6 +4667,8 @@ bool MAKERphone::settingsApp() {
46644667 if (input == 5 )
46654668 if (updateMenu ())
46664669 return true ;
4670+ }
4671+
46674672
46684673 applySettings ();
46694674 display.fillScreen (TFT_BLACK);
@@ -4692,7 +4697,7 @@ bool MAKERphone::settingsApp() {
46924697 while (!update ());
46934698 }
46944699 return false ;
4695- }
4700+
46964701}
46974702void MAKERphone::networkMenu () {
46984703 uint8_t cursor = 0 ;
@@ -4834,7 +4839,7 @@ void MAKERphone::networkMenu() {
48344839 airplaneMode = !airplaneMode;
48354840 }
48364841
4837- if (buttons.kpd .pin_read (JOYSTICK_D) == 0 )
4842+ if (buttons.kpd .pin_read (JOYSTICK_D) == 0 )
48384843 {
48394844 while (buttons.kpd .pin_read (JOYSTICK_D) == 0 );
48404845 if (cursor == 0 )
@@ -4852,7 +4857,11 @@ void MAKERphone::networkMenu() {
48524857
48534858 }
48544859 if (buttons.released (BTN_B)) // BUTTON BACK
4860+ {
4861+ while (!update ());
48554862 break ;
4863+ }
4864+
48564865
48574866 update ();
48584867 }
0 commit comments