twn_input.c: zero ctx.mouse_movement on focus lost

This commit is contained in:
veclavtalica 2025-01-14 02:56:55 +03:00
parent 2351d4114c
commit 664f123a85

View File

@ -234,6 +234,8 @@ void input_state_update(InputState *input) {
if (ctx.window_mouse_resident)
ctx.game.mouse_movement = input->mouse_relative_position;
else
ctx.game.mouse_movement = (Vec2){0};
for (size_t i = 0; i < shlenu(input->action_hash); ++i) {
Action *action = &input->action_hash[i].value;