twn_input.c: zero ctx.mouse_movement on focus lost
This commit is contained in:
parent
2351d4114c
commit
664f123a85
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user