Skip to content
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

system: check reset button state correctly on gamecube #124

Merged
merged 1 commit into from
Jan 24, 2022

Conversation

DacoTaco
Copy link
Member

@DacoTaco DacoTaco commented Jan 15, 2022

also unmask the irq after callback so pressing it again re-triggers the irq

Things to note :

  • the registry always contains the state of the reset button ( 0 = pressed, 1 = unpressed ) and the IRQ only triggers when going from 1 to 0 (it doesn't trigger when holding it, or releasing it)
  • the while loop i left as is, besides it now checking on reset not being pressed (to deal with debounce)
  • callback is executed when the button is pressed (unlike before where it only executed if it wasn't pressed)
  • IRQ is unmasked after the callback so the IRQ can be triggered again ( and therefor acts the same on GC and Wii )

also unmask the irq after callback so pressing it again re-triggers the irq
Extrems pushed a commit to emukidid/libogc that referenced this pull request Jan 22, 2022
@DacoTaco DacoTaco merged commit e1705d1 into devkitPro:master Jan 24, 2022
@DacoTaco DacoTaco deleted the fixes/GamecubeReset branch February 20, 2022 11:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant