fix touch event
This commit is contained in:
parent
fdb357f02f
commit
10dda34d4d
|
|
@ -76,12 +76,10 @@ void mainloop() {
|
|||
mouse_data.x = (int)x;
|
||||
mouse_data.y = (int)y;
|
||||
|
||||
if (event.tfinger.fingerId == 0) {
|
||||
if (event.type == SDL_FINGERDOWN || event.type == SDL_FINGERMOTION) {
|
||||
mouse_data.btn1 = 1;
|
||||
} else if (event.type == SDL_FINGERUP) {
|
||||
mouse_data.btn1 = 0;
|
||||
}
|
||||
if (event.type == SDL_FINGERDOWN || event.type == SDL_FINGERMOTION) {
|
||||
mouse_data.btn1 = 1;
|
||||
} else if (event.type == SDL_FINGERUP) {
|
||||
mouse_data.btn1 = 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue