Skip to content

Commit

Permalink
Address review feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Nopey committed Dec 2, 2024
1 parent 6706c6f commit 017e6d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions src/controller/controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,9 @@ void controller_cmd(controller *ctrl, int action, ctrl_event **ev) {
iterator it;
hook_function **p = 0;
list_iter_begin(&ctrl->hooks, &it);
while((p = iter_next(&it)) != NULL) {
((*p)->fp)((*p)->source, action);
while((p = iter_next(&it))) {
hook_function hook = **p;
(hook.fp)(hook.source, action);
}

ctrl_action_push(ev, action);
Expand Down
2 changes: 1 addition & 1 deletion src/controller/joystick.c
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ void joystick_menu_poll_all(controller *menu_ctrl, ctrl_event **ev) {
return;

joystick k;
memset(&k, 0, sizeof k);
memset(&k, 0, sizeof(k));
joystick_keys keys;
internal_joystick_default_keys(&keys);
k.keys = &keys;
Expand Down

0 comments on commit 017e6d8

Please sign in to comment.