aboutsummaryrefslogtreecommitdiff
path: root/src/rumble.c
diff options
context:
space:
mode:
authorUneven Prankster <unevenprankster@protonmail.com>2023-08-12 13:32:39 -0300
committerUneven Prankster <unevenprankster@protonmail.com>2023-08-12 13:32:39 -0300
commit58c6022ebc22e88397f4ac85788b02dafa679b7d (patch)
treef5069cb935b79ef71c04d0bec7742c28fcbed3b2 /src/rumble.c
parente7379bed59af0f50126af61953bc4f10af04a4dd (diff)
Replaced checks with trap asserts, it's 2023, you can use gdb, we have technology
Diffstat (limited to 'src/rumble.c')
-rw-r--r--src/rumble.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/rumble.c b/src/rumble.c
index 5e782b7..798b5ec 100644
--- a/src/rumble.c
+++ b/src/rumble.c
@@ -20,11 +20,8 @@ static fx32 timer = 0;
void set_rumble(f32 duration, f32 strength)
{
- // Sanity check
- if(strength > 1.0f)
- strength = 1.0f;
- else if(strength < 0.0f)
- strength = 0.0f;
+ // If game code is surpassing this something is wrong!!
+ assert(strength >= 0.f && strength <= 1.f);
XINPUT_VIBRATION state = {};
state.wLeftMotorSpeed = (unsigned)(strength * 65535.0f);