SDL/src/events
Sam Lantinga f4b77110d2 Fixed bug 2503 - Loop indexing and event union errors in SDL_gesture.c
Lasse ??rni

While enabling $1 gesture support in the Urho3D engine which uses SDL2 I detected some errors in the gesture code in SDL_gesture.c:

- In the function SDL_SaveAllDollarTemplates() the following line should use index variable j instead of i:

    rtrn += SaveTemplate(&touch->dollarTemplate[i], dst);

- In the function SDL_SaveDollarTemplate() the following code should use index variable j instead of i:

    if (touch->dollarTemplate[i].hash == gestureId) {
        return SaveTemplate(&touch->dollarTemplate[i], dst);

- In the function SDL_SendGestureDollar() the x & y coordinates are being written to the mgesture structure, which results in garbage due to dgesture and mgesture being different data structures inside the union. The coordinates should be written to dgesture.x & dgesture.y respectively
2014-04-17 19:52:15 -07:00
..
blank_cursor.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
default_cursor.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
scancodes_darwin.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
scancodes_linux.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
scancodes_windows.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
scancodes_xfree86.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_clipboardevents.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_clipboardevents_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_dropevents.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_dropevents_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_events.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_events_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_gesture.c Fixed bug 2503 - Loop indexing and event union errors in SDL_gesture.c 2014-04-17 19:52:15 -07:00
SDL_gesture_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_keyboard.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_keyboard_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_mouse.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_mouse_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_quit.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_sysevents.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_touch.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_touch_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_windowevents.c Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00
SDL_windowevents_c.h Added a README file regarding WinRT support 2014-04-09 21:29:19 -04:00