mouse click fix

This commit is contained in:
leo 2023-08-08 11:33:42 +02:00
parent 9f36b6f556
commit aef52dda36
Signed by: leo
GPG Key ID: 0DD993BFB2B307DB
2 changed files with 2 additions and 2 deletions

@ -1 +1 @@
Subproject commit 6dd655d9e53d23e108c46d089ec33f753eed7aa1
Subproject commit 2ec5147e7ddd02aacb27424df56dbfe6d16cf808

2
main.c
View File

@ -104,7 +104,7 @@ void my_flush_cb(lv_disp_drv_t * disp, const lv_area_t * area, lv_color_t * buf)
void touchscreen_read_callback(lv_indev_drv_t * drv, lv_indev_data_t*data){
int x, y;
Uint32 button = SDL_GetMouseState(&x, &y);
if(SDL_BUTTON(1)) {
if(SDL_BUTTON(button) == 1) {
data->state = LV_INDEV_STATE_PRESSED;
} else {
data->state = LV_INDEV_STATE_RELEASED;