:: commit 7e50f302e750d414467046884c8c96746d1ae443

mintsuki <mintsuki@protonmail.com> — 2021-08-16 20:47

parents: 17c5ec43e0

term: Fix broken defines and calls

diff --git a/stage23/lib/term.h b/stage23/lib/term.h
index cddcda6f..514d3c27 100644
--- a/stage23/lib/term.h
+++ b/stage23/lib/term.h
@@ -81,10 +81,10 @@ extern void (*term_full_refresh)(void);
 #define TERM_CB_BELL 20
 #define TERM_CB_PRIVATE_ID 30
 #define TERM_CB_STATUS_REPORT 40
-#define TERM_CB_POS_REPORT 40
-#define TERM_CB_KBD_LEDS 50
-#define TERM_CB_MODE 60
-#define TERM_CB_LINUX 70
+#define TERM_CB_POS_REPORT 50
+#define TERM_CB_KBD_LEDS 60
+#define TERM_CB_MODE 70
+#define TERM_CB_LINUX 80
 
 #define TERM_CTX_SIZE ((uint64_t)(-1))
 #define TERM_CTX_SAVE ((uint64_t)(-2))
diff --git a/stage23/lib/term.s2.c b/stage23/lib/term.s2.c
index a54bff70..974ab167 100644
--- a/stage23/lib/term.s2.c
+++ b/stage23/lib/term.s2.c
@@ -396,7 +396,7 @@ static void dec_private_parse(uint8_t c) {
     }
 
     if (term_callback != NULL) {
-        term_callback(TERM_CB_DEC, c, esc_values_i, (uintptr_t)esc_values);
+        term_callback(TERM_CB_DEC, esc_values_i, (uintptr_t)esc_values, c);
     }
 }
 
@@ -432,7 +432,7 @@ static void mode_toggle(uint8_t c) {
     }
 
     if (term_callback != NULL) {
-        term_callback(TERM_CB_MODE, c, esc_values_i, (uintptr_t)esc_values);
+        term_callback(TERM_CB_MODE, esc_values_i, (uintptr_t)esc_values, c);
     }
 }
 
tab: 248 wrap: offon