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 human readable rotation logging #17387

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

sonninnos
Copy link
Collaborator

Description

Let's make the SET_ROTATION logging a bit more readable.

@zoltanvb
Copy link
Contributor

I'd suggest a %4 for the rotation_v array index, not sure how strictly it is checked earlier.

@sonninnos
Copy link
Collaborator Author

Sorry but I don't understand what that means.

@zoltanvb
Copy link
Contributor

RARCH_DBG("[Environ]: SET_ROTATION: %u (%udeg).\n", rotation, rotation_v[rotation%4]);

just to avoid a core calling SET_ROTATION with a dummy value and crashing in the process. I kinda expected the compiler to emit a warning, but did a build and apparently it doesn't.

@sonninnos
Copy link
Collaborator Author

Ok, cool, thanks, updated.

@LibretroAdmin LibretroAdmin merged commit 8ef798e into libretro:master Jan 11, 2025
27 checks passed
@sonninnos sonninnos deleted the rotation-logging branch January 11, 2025 01:59
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.

3 participants