Browse Source

🐛 Fix FTDI Eve unicode and spinner dialog (#22468)

Marcio T 4 years ago
parent
commit
39e5c86544
No account linked to committer's email address

+ 2
- 2
Marlin/src/lcd/extui/ftdi_eve_touch_ui/ftdi_eve_lib/extended/unicode/unicode.cpp View File

68
 
68
 
69
   utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) {
69
   utf8_char_t FTDI::get_utf8_char_and_inc(const char *&c) {
70
     utf8_char_t val = *(uint8_t*)c++;
70
     utf8_char_t val = *(uint8_t*)c++;
71
-    if ((val & 0xC0) == 0x80)
71
+    if ((val & 0xC0) == 0xC0)
72
       while ((*c & 0xC0) == 0x80)
72
       while ((*c & 0xC0) == 0x80)
73
         val = (val << 8) | *(uint8_t*)c++;
73
         val = (val << 8) | *(uint8_t*)c++;
74
     return val;
74
     return val;
76
 
76
 
77
   utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) {
77
   utf8_char_t FTDI::get_utf8_char_and_inc(char *&c) {
78
     utf8_char_t val = *(uint8_t*)c++;
78
     utf8_char_t val = *(uint8_t*)c++;
79
-    if ((val & 0xC0) == 0x80)
79
+    if ((val & 0xC0) == 0xC0)
80
       while ((*c & 0xC0) == 0x80)
80
       while ((*c & 0xC0) == 0x80)
81
         val = (val << 8) | *(uint8_t*)c++;
81
         val = (val << 8) | *(uint8_t*)c++;
82
     return val;
82
     return val;

+ 1
- 1
Marlin/src/lcd/extui/ftdi_eve_touch_ui/generic/spinner_dialog_box.cpp View File

49
 void SpinnerDialogBox::hide() {
49
 void SpinnerDialogBox::hide() {
50
   CommandProcessor cmd;
50
   CommandProcessor cmd;
51
   cmd.stop().execute();
51
   cmd.stop().execute();
52
+  GOTO_PREVIOUS();
52
 }
53
 }
53
 
54
 
54
 void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) {
55
 void SpinnerDialogBox::enqueueAndWait(progmem_str message, progmem_str commands) {
66
   if (mydata.auto_hide && !commandsInQueue()) {
67
   if (mydata.auto_hide && !commandsInQueue()) {
67
     mydata.auto_hide = false;
68
     mydata.auto_hide = false;
68
     hide();
69
     hide();
69
-    GOTO_PREVIOUS();
70
   }
70
   }
71
 }
71
 }
72
 
72
 

Loading…
Cancel
Save