Better smoothing and added missing break on MOUSE_WHEEL

This commit is contained in:
iota97 2020-03-03 17:17:58 +01:00
parent fc1b83fd93
commit b0307301e3

View File

@ -888,6 +888,7 @@ int main(int argc, char *argv[]) {
key.flags = KEY_UP;
NativeKey(key);
}
break;
case SDL_MOUSEMOTION:
if (mouseDown) {
TouchInput input;
@ -897,8 +898,8 @@ int main(int argc, char *argv[]) {
input.id = 0;
NativeTouch(input);
}
mouseDeltaX = event.motion.xrel;
mouseDeltaY = event.motion.yrel;
mouseDeltaX += event.motion.xrel;
mouseDeltaY += event.motion.yrel;
break;
case SDL_MOUSEBUTTONUP:
switch (event.button.button) {