浏览代码

Don't set Bluetooth controllers to wired power level

Sam Lantinga 3 年之前
父节点
当前提交
946f4777f6
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      src/joystick/hidapi/SDL_hidapi_switch.c

+ 1 - 1
src/joystick/hidapi/SDL_hidapi_switch.c

@@ -1318,7 +1318,7 @@ HIDAPI_DriverSwitch_OpenJoystick(SDL_HIDAPI_Device *device, SDL_Joystick *joysti
     /* Initialize the joystick capabilities */
     joystick->nbuttons = 16;
     joystick->naxes = SDL_CONTROLLER_AXIS_MAX;
-    joystick->epowerlevel = SDL_JOYSTICK_POWER_WIRED;
+    joystick->epowerlevel = ctx->m_bUsingBluetooth ? SDL_JOYSTICK_POWER_UNKNOWN : SDL_JOYSTICK_POWER_WIRED;
 
     return SDL_TRUE;