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 translations of 3DS result macros + debug impl #35

Merged
merged 2 commits into from
Feb 1, 2022

Conversation

ian-h-chamberlain
Copy link
Member

As @AzureMarker pointed out, we can use these to decode error return values from the libctru APIs. I also added a little more info to the Debug impl for ctru_rs::Result which should help debugging a bit in some cases.

See https://github.com/devkitPro/libctru/blob/master/libctru/include/3ds/result.h for the original definitions, which I assume are not generated by bindgen since they are macros and not simple #defines.

I intend to use these in rust3ds/shim-3ds#8 to translate from libctru codes to errno values, and make the getrandom behavior closer to spec.

ctru-rs/src/error.rs Show resolved Hide resolved
ctru-rs/src/error.rs Outdated Show resolved Hide resolved
@Meziu Meziu merged commit c39454f into rust3ds:master Feb 1, 2022
@ian-h-chamberlain ian-h-chamberlain deleted the errors/split-and-debug branch February 1, 2022 17:32
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