summaryrefslogtreecommitdiffstats
path: root/src/input_common/drivers/virtual_gamepad.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2023-06-06 06:43:43 +0200
committerGitHub <noreply@github.com>2023-06-06 06:43:43 +0200
commitcb95d7fe1b6d81899fe6b279400da2c991e3132c (patch)
treea856ac45b1053009c4c11ee141c49d7faa4c8a19 /src/input_common/drivers/virtual_gamepad.h
parentMerge pull request #10611 from liamwhite/audio-deadlock (diff)
parentMerge pull request #10633 from t895/variable-surface-ratio (diff)
downloadyuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.gz
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.bz2
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.lz
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.xz
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.tar.zst
yuzu-cb95d7fe1b6d81899fe6b279400da2c991e3132c.zip
Diffstat (limited to '')
-rw-r--r--src/input_common/drivers/virtual_gamepad.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/src/input_common/drivers/virtual_gamepad.h b/src/input_common/drivers/virtual_gamepad.h
index 3df91cc6f..dfbc45a28 100644
--- a/src/input_common/drivers/virtual_gamepad.h
+++ b/src/input_common/drivers/virtual_gamepad.h
@@ -52,7 +52,7 @@ public:
void SetButtonState(std::size_t player_index, VirtualButton button_id, bool value);
/**
- * Sets the status of all buttons bound with the key to released
+ * Sets the status of a stick to a specific player index
* @param player_index the player number that will take this action
* @param axis_id the id of the axis to move
* @param x_value the position of the stick in the x axis
@@ -62,6 +62,16 @@ public:
void SetStickPosition(std::size_t player_index, VirtualStick axis_id, float x_value,
float y_value);
+ /**
+ * Sets the status of the motion sensor to a specific player index
+ * @param player_index the player number that will take this action
+ * @param delta_timestamp time passed since last reading
+ * @param gyro_x,gyro_y,gyro_z the gyro sensor readings
+ * @param accel_x,accel_y,accel_z the acelerometer reading
+ */
+ void SetMotionState(std::size_t player_index, u64 delta_timestamp, float gyro_x, float gyro_y,
+ float gyro_z, float accel_x, float accel_y, float accel_z);
+
/// Restores all inputs into the neutral position
void ResetControllers();