Fixed touch not being delivered as mouse events by default on Vita
Closes https://github.com/libsdl-org/SDL/pull/13070
This commit is contained in:
@@ -138,21 +138,25 @@ static void SDLCALL SDL_TouchMouseEventsChanged(void *userdata, const char *name
|
|||||||
#ifdef SDL_PLATFORM_VITA
|
#ifdef SDL_PLATFORM_VITA
|
||||||
static void SDLCALL SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
static void SDLCALL SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
|
||||||
{
|
{
|
||||||
|
Uint8 vita_touch_mouse_device = 1;
|
||||||
|
|
||||||
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
|
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
|
||||||
if (hint) {
|
if (hint) {
|
||||||
switch (*hint) {
|
switch (*hint) {
|
||||||
default:
|
|
||||||
case '0':
|
case '0':
|
||||||
mouse->vita_touch_mouse_device = 1;
|
vita_touch_mouse_device = 1;
|
||||||
break;
|
break;
|
||||||
case '1':
|
case '1':
|
||||||
mouse->vita_touch_mouse_device = 2;
|
vita_touch_mouse_device = 2;
|
||||||
break;
|
break;
|
||||||
case '2':
|
case '2':
|
||||||
mouse->vita_touch_mouse_device = 3;
|
vita_touch_mouse_device = 3;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
mouse->vita_touch_mouse_device = vita_touch_mouse_device;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user