mouse click fix
This commit is contained in:
parent
9f36b6f556
commit
aef52dda36
@ -1 +1 @@
|
|||||||
Subproject commit 6dd655d9e53d23e108c46d089ec33f753eed7aa1
|
Subproject commit 2ec5147e7ddd02aacb27424df56dbfe6d16cf808
|
2
main.c
2
main.c
@ -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){
|
void touchscreen_read_callback(lv_indev_drv_t * drv, lv_indev_data_t*data){
|
||||||
int x, y;
|
int x, y;
|
||||||
Uint32 button = SDL_GetMouseState(&x, &y);
|
Uint32 button = SDL_GetMouseState(&x, &y);
|
||||||
if(SDL_BUTTON(1)) {
|
if(SDL_BUTTON(button) == 1) {
|
||||||
data->state = LV_INDEV_STATE_PRESSED;
|
data->state = LV_INDEV_STATE_PRESSED;
|
||||||
} else {
|
} else {
|
||||||
data->state = LV_INDEV_STATE_RELEASED;
|
data->state = LV_INDEV_STATE_RELEASED;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user