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

Add input buttons #51

Merged
merged 3 commits into from
Jun 15, 2024
Merged

Add input buttons #51

merged 3 commits into from
Jun 15, 2024

Conversation

pineman
Copy link
Owner

@pineman pineman commented Jun 11, 2024

left: ctx.input(|i| i.key_down(Key::H)),
right: ctx.input(|i| i.key_down(Key::L)),
};
self.gb.bus_mut().set_buttons(buttons);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is there a way we can avoid fpt-egui accessing the bus directly?

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well, either the client has to write into the gameboy, or the gameboy has to reach out and ask the client what the state of the buttons is. and it ultimately will need to touch the bus since it is a hardware register... I don't have strong opinions whether the client accesses the bus directly or indirectly. are you suggesting a method in e.g. the gameboy itself to set the buttons like self.gb.set_buttons vs self.gb.bus_mut().set_buttons or something else?

@pineman pineman merged commit fddaf44 into main Jun 15, 2024
1 check passed
@pineman pineman deleted the input branch June 15, 2024 19:34
joajfreitas pushed a commit that referenced this pull request Jul 13, 2024
@joajfreitas joajfreitas added the enhancement New feature or request label Aug 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants