Parcourir la source

Vibration docs

Karl Zylinski il y a 6 mois
Parent
commit
2b15560777
2 fichiers modifiés avec 3 ajouts et 1 suppressions
  1. 0 1
      README.md
  2. 3 0
      karl2d.odin

+ 0 - 1
README.md

@@ -26,7 +26,6 @@ Here follows my near-future TODO list
 	* check status of gamepad
 	* what happens when you pull one out?
 	* playstation
-	* vibration
 * basic text rendering
 * Do proper checks of vertex count and dispatch rendering when full
 	* What happens when list is full? We can't just empty the vertex list due to being used by input assembler etc.

+ 3 - 0
karl2d.odin

@@ -288,6 +288,9 @@ get_gamepad_axis :: proc(gamepad: Gamepad_Index, axis: Gamepad_Axis) -> f32 {
 	return win.get_gamepad_axis(gamepad, axis)
 }
 
+// Set the left and right vibration motor speed. The range of left and right is 0 to 1. Note that on
+// most gamepads, the left motor is "low frequency" and the right motor is "high frequency". They do
+// not vibrate with the same speed.
 set_gamepad_vibration :: proc(gamepad: Gamepad_Index, left: f32, right: f32) {
 	win.set_gamepad_vibration(gamepad, left, right)
 }