Skip to content

Commit 25f2376

Browse files
committed
Fixed touch not being delivered as mouse events by default on Vita
Closes #13070
1 parent afd1e51 commit 25f2376

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/events/SDL_mouse.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,21 +138,25 @@ static void SDLCALL SDL_TouchMouseEventsChanged(void *userdata, const char *name
138138
#ifdef SDL_PLATFORM_VITA
139139
static void SDLCALL SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *name, const char *oldValue, const char *hint)
140140
{
141+
Uint8 vita_touch_mouse_device = 1;
142+
141143
SDL_Mouse *mouse = (SDL_Mouse *)userdata;
142144
if (hint) {
143145
switch (*hint) {
144-
default:
145146
case '0':
146-
mouse->vita_touch_mouse_device = 1;
147+
vita_touch_mouse_device = 1;
147148
break;
148149
case '1':
149-
mouse->vita_touch_mouse_device = 2;
150+
vita_touch_mouse_device = 2;
150151
break;
151152
case '2':
152-
mouse->vita_touch_mouse_device = 3;
153+
vita_touch_mouse_device = 3;
154+
break;
155+
default:
153156
break;
154157
}
155158
}
159+
mouse->vita_touch_mouse_device = vita_touch_mouse_device;
156160
}
157161
#endif
158162

0 commit comments

Comments
 (0)