SDL: Vita: Fix off-by-one error for synthetic mouse events (878ea)

From 878ea48b607f23e4ec8c12d1395b86ab529e30d0 Mon Sep 17 00:00:00 2001
From: ROllerozxa <[EMAIL REDACTED]>
Date: Thu, 16 Jan 2025 20:18:11 +0100
Subject: [PATCH] Vita: Fix off-by-one error for synthetic mouse events

(cherry picked from commit cdc5483cf9683fabf0a897954a510574e61af418)
---
 src/events/SDL_mouse.c | 6 +++---
 src/events/SDL_touch.c | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/events/SDL_mouse.c b/src/events/SDL_mouse.c
index 48b3dae558d8f..a9a89f63d82b1 100644
--- a/src/events/SDL_mouse.c
+++ b/src/events/SDL_mouse.c
@@ -122,13 +122,13 @@ static void SDLCALL SDL_VitaTouchMouseDeviceChanged(void *userdata, const char *
         switch (*hint) {
         default:
         case '0':
-            mouse->vita_touch_mouse_device = 0;
+            mouse->vita_touch_mouse_device = 1;
             break;
         case '1':
-            mouse->vita_touch_mouse_device = 1;
+            mouse->vita_touch_mouse_device = 2;
             break;
         case '2':
-            mouse->vita_touch_mouse_device = 2;
+            mouse->vita_touch_mouse_device = 3;
             break;
         }
     }
diff --git a/src/events/SDL_touch.c b/src/events/SDL_touch.c
index 6824f75ebbf57..ea32b086608fc 100644
--- a/src/events/SDL_touch.c
+++ b/src/events/SDL_touch.c
@@ -252,7 +252,7 @@ int SDL_SendTouch(SDL_TouchID id, SDL_FingerID fingerid, SDL_Window *window,
     /* SDL_HINT_VITA_TOUCH_MOUSE_DEVICE: controlling which touchpad should generate synthetic mouse events, PSVita-only */
     {
 #if defined(__vita__)
-        if (mouse->touch_mouse_events && ((mouse->vita_touch_mouse_device == id) || (mouse->vita_touch_mouse_device == 2))) {
+        if (mouse->touch_mouse_events && ((mouse->vita_touch_mouse_device == id) || (mouse->vita_touch_mouse_device == 3))) {
 #else
         if (mouse->touch_mouse_events) {
 #endif