Skip to content

[PL-81] - Support for achievement progress#60

Merged
kzryzstof merged 6 commits into
mainfrom
features/pl-81/support-achievement-progress
Apr 21, 2026
Merged

[PL-81] - Support for achievement progress#60
kzryzstof merged 6 commits into
mainfrom
features/pl-81/support-achievement-progress

Conversation

@kzryzstof
Copy link
Copy Markdown
Collaborator

This pull request implements support for tracking and displaying Xbox achievement progress in real time, including partial progress (e.g., "42/100") for achievements that are not yet unlocked. It adds new fields to Xbox achievement and progress structures, updates the logic to patch and display measured progress in-place without resetting the achievement cycle, and ensures UI elements reflect these updates immediately. Additionally, it improves session state handling for RetroArch achievements and refines text source updates for better visual feedback.

Xbox Achievement Progress Tracking:

  • Added progression_current and progression_target fields to xbox_achievement_t and current/target to xbox_achievement_progress_t to store partial progress values, updated parsing, copying, and freeing logic to handle these fields.
  • Implemented xbox_session_progress_achievement to update in-progress achievements and log their state, and integrated it with the Xbox monitor event flow.

Achievement Cycle and Display Updates:

  • Added achievement_cycle_refresh_current to re-notify subscribers after in-place field updates (e.g., measured progress), ensuring the UI updates without resetting the cycle.
  • Modified the achievement display logic to include measured progress in the achievement name string when available.
  • Updated text_source_update_text to propagate the active color flag even when the text does not change, ensuring visual state changes are reflected.

Session and State Handling Improvements:

  • Improved session-ready logic for RetroArch achievements to avoid starting the cycle with an empty list, preventing initial blank states.
  • Updated Xbox session unlock logic to handle null unlock timestamps robustly and clear in-progress tracking when an achievement is unlocked.

Codebase Maintenance:

  • Added missing includes and source file references for new functionality.
  • Minor docstring and logging improvements for clarity.

These changes ensure that Xbox achievement progress is tracked accurately, displayed responsively, and managed efficiently throughout the session lifecycle.

- Add support for "current" and "target" progress tracking in achievements.
- Implement `xbox_session_progress_achievement` to update achievement status dynamically.
- Refine JSON parsing logic to extract progression data.
- Ensure proper memory management for new fields in `xbox_achievement_progress_t`.
- Update Xbox achievement progression logic to handle in-place updates for measured_progress.
- Add fallback unlock timestamp handling for Xbox achievements.
- Enhance session readiness checks for Retro achievements to avoid empty list issues.
- Introduce `achievement_cycle_refresh_current` for reactive display updates in achievement cycles.
@kzryzstof kzryzstof marked this pull request as ready for review April 21, 2026 00:41
@kzryzstof kzryzstof merged commit de366ed into main Apr 21, 2026
7 checks passed
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.

1 participant