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

Removed warnings by explicitly casting to u8 for controllers #803

Merged

Conversation

crozhon
Copy link
Contributor

@crozhon crozhon commented Aug 14, 2014

No description provided.

@crozhon
Copy link
Contributor Author

crozhon commented Aug 18, 2014

Is there anything preventing this from being merged?

@lioncash
Copy link
Member

Oh sorry about that. This looks fine.

@crozhon
Copy link
Contributor Author

crozhon commented Aug 18, 2014

It's no problem.

Sonicadvance1 added a commit that referenced this pull request Aug 18, 2014
Removed warnings by explicitly casting to `u8` for controllers
@Sonicadvance1 Sonicadvance1 merged commit bac9634 into dolphin-emu:master Aug 18, 2014
@Hydr8gon
Copy link
Member

This change causes the Android joysticks to not register anything outside of the top right corner, on-screen or mapped. This does not affect the desktop builds. Didn't really have time to do anything about it, just reporting it ATM.

pad->stickX = GCPadStatus::MAIN_STICK_CENTER_X + (x * GCPadStatus::MAIN_STICK_RADIUS);
pad->stickY = GCPadStatus::MAIN_STICK_CENTER_Y + (y * GCPadStatus::MAIN_STICK_RADIUS);
pad->stickX = GCPadStatus::MAIN_STICK_CENTER_X + (u8)(x * GCPadStatus::MAIN_STICK_RADIUS);
pad->stickY = GCPadStatus::MAIN_STICK_CENTER_Y + (u8)(y * GCPadStatus::MAIN_STICK_RADIUS);

This comment was marked as off-topic.

@archshift
Copy link
Contributor

I think this would be a great candidate for C++ casts...it would remove all ambiguity from what is being casted.

@lioncash
Copy link
Member

lioncash commented Sep 3, 2014

Agreed

@crozhon
Copy link
Contributor Author

crozhon commented Sep 3, 2014

Alright, I've submitted a PR that should fix these bugs. Apologies for introducing them,

PR#946

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
6 participants