浏览代码

add SetGamepadVibration to rgfw and template (#4612)

JupiterRider 8 月之前
父节点
当前提交
714cd5ef5c
共有 2 个文件被更改,包括 12 次插入0 次删除
  1. 6 0
      src/platforms/rcore_desktop_rgfw.c
  2. 6 0
      src/platforms/rcore_template.c

+ 6 - 0
src/platforms/rcore_desktop_rgfw.c

@@ -780,6 +780,12 @@ int SetGamepadMappings(const char *mappings)
     return 0;
 }
 
+// Set gamepad vibration
+void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
+{
+    TRACELOG(LOG_WARNING, "GamepadSetVibration() not available on target platform");
+}
+
 // Set mouse position XY
 void SetMousePosition(int x, int y)
 {

+ 6 - 0
src/platforms/rcore_template.c

@@ -381,6 +381,12 @@ int SetGamepadMappings(const char *mappings)
     return 0;
 }
 
+// Set gamepad vibration
+void SetGamepadVibration(int gamepad, float leftMotor, float rightMotor, float duration)
+{
+    TRACELOG(LOG_WARNING, "GamepadSetVibration() not implemented on target platform");
+}
+
 // Set mouse position XY
 void SetMousePosition(int x, int y)
 {