1
0
mirror of https://github.com/trezor/trezor-firmware.git synced 2024-12-16 19:38:09 +00:00

fix discrepancy between msg_poll_ui_event and trezorui_poll_sdl_event

This commit is contained in:
Pavol Rusnak 2016-09-19 16:56:47 +02:00
parent 63d4cb3a29
commit 754350df9e
No known key found for this signature in database
GPG Key ID: 91F3B339B9A02A3D
2 changed files with 3 additions and 1 deletions

View File

@ -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;

View File

@ -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;