mirror of https://github.com/encounter/SDL.git
Set SDL_HINT_MOUSE_TOUCH_EVENTS for iPhone and iPad as well
This commit is contained in:
parent
b6f33a6870
commit
9eac91dd29
|
@ -319,11 +319,8 @@ extern "C" {
|
||||||
* \brief A variable controlling whether mouse events should generate synthetic touch events
|
* \brief A variable controlling whether mouse events should generate synthetic touch events
|
||||||
*
|
*
|
||||||
* This variable can be set to the following values:
|
* This variable can be set to the following values:
|
||||||
* "0" - Mouse events will not generate touch events
|
* "0" - Mouse events will not generate touch events (default for desktop platforms)
|
||||||
* "1" - Mouse events will generate touch events
|
* "1" - Mouse events will generate touch events (default for mobile platforms, such as Android and iOS)
|
||||||
*
|
|
||||||
* By default SDL will *not* generate touch events for mouse events
|
|
||||||
* Except for Android, they are generated by default.
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
#define SDL_HINT_MOUSE_TOUCH_EVENTS "SDL_MOUSE_TOUCH_EVENTS"
|
||||||
|
|
|
@ -114,7 +114,7 @@ SDL_MouseTouchEventsChanged(void *userdata, const char *name, const char *oldVal
|
||||||
|
|
||||||
if (hint == NULL || *hint == '\0') {
|
if (hint == NULL || *hint == '\0') {
|
||||||
/* Default */
|
/* Default */
|
||||||
#if defined(__ANDROID__)
|
#if defined(__ANDROID__) || (defined(__IPHONEOS__) && !defined(__TVOS__))
|
||||||
mouse->mouse_touch_events = SDL_TRUE;
|
mouse->mouse_touch_events = SDL_TRUE;
|
||||||
#else
|
#else
|
||||||
mouse->mouse_touch_events = SDL_FALSE;
|
mouse->mouse_touch_events = SDL_FALSE;
|
||||||
|
|
Loading…
Reference in New Issue