-
Notifications
You must be signed in to change notification settings - Fork 37
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 rc_client_t #242
Merged
Merged
Add rc_client_t #242
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Moves a large portion of the code from RetroArch into rcheevos for use by other standalone emulators:
rc_client_t
instance is passed to all callbacks. A single pointer to emulator-provided data can be attached to therc_client_t
instance.The emulator is still responsible for providing an HTTP library and dispatching server requests. Additionally, it is responsible for downloading the game/achievement/user images, showing all supported UI, and hardcore restriction enforcements.
This code does not do any image management. Functions are provided for generating the URL of the images to be downloaded, and events are dispatched when UI should be updated.
General implementation details are provided in the wiki. Pages will be added to sidebar once this is merged.
A mutex is provided for thread-safety within the
rc_client_t
. It is implemented in the same manner as supported by RetroArch, which should provide pretty thorough support across platforms. For systems without pthread support, it can be compiled out by definingRC_NO_THREADS
.These changes should simplify rolling out new UI features (like the recently added leaderboard collapsing, and the much-desired subset and core at the same time). The encapsulated APIs also allow for expansion of the APIs without explicitly requiring changes in the emulator code.