Skip to content

Merge in gamepadshift fix to master. #1943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 13, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion shared-bindings/gamepad/GamePad.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ STATIC mp_obj_t gamepad_make_new(const mp_obj_type_t *type, size_t n_args,
STATIC mp_obj_t gamepad_get_pressed(mp_obj_t self_in) {
gamepad_obj_t* gamepad_singleton = MP_STATE_VM(gamepad_singleton);
mp_obj_t pressed = MP_OBJ_NEW_SMALL_INT(gamepad_singleton->pressed);
gamepad_singleton->pressed = 0;
gamepad_singleton->pressed = gamepad_singleton->last;
return pressed;
}
MP_DEFINE_CONST_FUN_OBJ_1(gamepad_get_pressed_obj, gamepad_get_pressed);
Expand Down
2 changes: 1 addition & 1 deletion shared-bindings/gamepadshift/GamePadShift.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ STATIC mp_obj_t gamepadshift_make_new(const mp_obj_type_t *type, size_t n_args,
STATIC mp_obj_t gamepadshift_get_pressed(mp_obj_t self_in) {
gamepadshift_obj_t* gamepad_singleton = MP_STATE_VM(gamepad_singleton);
mp_obj_t pressed = MP_OBJ_NEW_SMALL_INT(gamepad_singleton->pressed);
gamepad_singleton->pressed = 0;
gamepad_singleton->pressed = gamepad_singleton->last;
return pressed;
}
MP_DEFINE_CONST_FUN_OBJ_1(gamepadshift_get_pressed_obj, gamepadshift_get_pressed);
Expand Down