From 754350df9e041b7995c930d3d5f26ca66901685d Mon Sep 17 00:00:00 2001 From: Pavol Rusnak Date: Mon, 19 Sep 2016 16:56:47 +0200 Subject: [PATCH] fix discrepancy between msg_poll_ui_event and trezorui_poll_sdl_event --- extmod/modtrezormsg/modtrezormsg-stmhal.h | 3 ++- extmod/modtrezorui/display-unix.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/extmod/modtrezormsg/modtrezormsg-stmhal.h b/extmod/modtrezormsg/modtrezormsg-stmhal.h index 60c9d7bfa7..b50f7860cf 100644 --- a/extmod/modtrezormsg/modtrezormsg-stmhal.h +++ b/extmod/modtrezormsg/modtrezormsg-stmhal.h @@ -14,6 +14,7 @@ ssize_t msg_send(uint8_t iface, const uint8_t *buf, size_t len) return -1; } +// this should match values used in trezorui_poll_sdl_event() in modtrezorui/display-unix.h uint32_t msg_poll_ui_event(void) { static int lp = 0; @@ -26,7 +27,7 @@ uint32_t msg_poll_ui_event(void) r = 0x00020000; // touch move } if (lp == 1 && p == 0) { - r = 0x00030000; // touch end + r = 0x00040000; // touch end } lp = p; return r; diff --git a/extmod/modtrezorui/display-unix.h b/extmod/modtrezorui/display-unix.h index 1b5dcc4231..c411e79422 100644 --- a/extmod/modtrezorui/display-unix.h +++ b/extmod/modtrezorui/display-unix.h @@ -32,6 +32,7 @@ void DATA(uint8_t x) { } } +// this should match values used in msg_poll_ui_event() in modtrezormsg/modtrezormsg-stmhal.h uint32_t trezorui_poll_sdl_event(void) { SDL_Event event;