Commit d7e0c54dde1df08e543d2477f87df5574a28c718

Ivan Epifanov 2022-01-27T10:29:45

PSVita: send initial SDL_JOYDEVICEADDED events

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/src/joystick/vita/SDL_sysjoystick.c b/src/joystick/vita/SDL_sysjoystick.c
index 3ef1fc1..aa52cd7 100644
--- a/src/joystick/vita/SDL_sysjoystick.c
+++ b/src/joystick/vita/SDL_sysjoystick.c
@@ -147,7 +147,7 @@ int VITA_JoystickInit(void)
     // after the app has already started.
 
     SDL_numjoysticks = 1;
-
+    SDL_PrivateJoystickAdded(0);
     // How many additional paired controllers are there?
     sceCtrlGetControllerPortInfo(&myPortInfo);
 
@@ -157,6 +157,7 @@ int VITA_JoystickInit(void)
     {
         if (myPortInfo.port[i]!=SCE_CTRL_TYPE_UNPAIRED)
         {
+            SDL_PrivateJoystickAdded(SDL_numjoysticks);
             SDL_numjoysticks++;
         }
     }