Skip to content

Commit

Permalink
adds gamepad state being reset (#2579)
Browse files Browse the repository at this point in the history
  • Loading branch information
LettucePie committed May 11, 2024
1 parent 063758b commit d8c554f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/core/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,10 @@ void tic_api_reset(tic_mem* memory)
// is copied to previous. This duplicates the prior behavior of
// `ram.input.keyboard` (which existing outside `state`).
u32 kb_now = core->state.keyboard.now.data;
u32 gp_now = core->state.gamepads.now.data;
ZEROMEM(core->state);
core->state.keyboard.now.data = kb_now;
core->state.gamepads.now.data = gp_now;
tic_api_clip(memory, 0, 0, TIC80_WIDTH, TIC80_HEIGHT);

resetVbank(memory);
Expand Down

0 comments on commit d8c554f

Please sign in to comment.