ソースを参照

PSVita: send initial SDL_JOYDEVICEADDED events

Ivan Epifanov 4 年 前
コミット
d7e0c54dde
1 ファイル変更2 行追加1 行削除
  1. 2 1
      src/joystick/vita/SDL_sysjoystick.c

+ 2 - 1
src/joystick/vita/SDL_sysjoystick.c

@@ -147,7 +147,7 @@ int VITA_JoystickInit(void)
     // after the app has already started.
     // after the app has already started.
 
 
     SDL_numjoysticks = 1;
     SDL_numjoysticks = 1;
-
+    SDL_PrivateJoystickAdded(0);
     // How many additional paired controllers are there?
     // How many additional paired controllers are there?
     sceCtrlGetControllerPortInfo(&myPortInfo);
     sceCtrlGetControllerPortInfo(&myPortInfo);
 
 
@@ -157,6 +157,7 @@ int VITA_JoystickInit(void)
     {
     {
         if (myPortInfo.port[i]!=SCE_CTRL_TYPE_UNPAIRED)
         if (myPortInfo.port[i]!=SCE_CTRL_TYPE_UNPAIRED)
         {
         {
+            SDL_PrivateJoystickAdded(SDL_numjoysticks);
             SDL_numjoysticks++;
             SDL_numjoysticks++;
         }
         }
     }
     }