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

Fixed typo which prevents the auto detection of certain wired adapters #918

Merged
merged 1 commit into from
Feb 23, 2024
Merged

Conversation

pdaehne
Copy link
Contributor

@pdaehne pdaehne commented Feb 21, 2024

Since restructuring the code on Apr 14, 2023, there seems to be a small typo in BlueRetro/main/wired/detect.c which prevents the auto detection of certain HW1 wired adapters. The buggy line 34 currently looks like this:

if (io & BIT(detect_pin[i] - 32)) {

In my opinion this should be

if (io & BIT(detect_pin[i] < 32 ? detect_pin[i] : detect_pin[i] - 32)) {

or much simpler

if (io & BIT(detect_pin[i] & 31)) {

@darthcloud darthcloud merged commit 1afdb81 into darthcloud:master Feb 23, 2024
49 checks passed
@darthcloud
Copy link
Owner

Great catch!

Thank a lot!!

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.

2 participants