Skip to content

fix: font rebuild at every frame#1272

Merged
doodlum merged 4 commits into
community-shaders:devfrom
Pentalimbed:rc-fix-font-rebuild
Jul 16, 2025
Merged

fix: font rebuild at every frame#1272
doodlum merged 4 commits into
community-shaders:devfrom
Pentalimbed:rc-fix-font-rebuild

Conversation

@Pentalimbed
Copy link
Copy Markdown
Collaborator

@Pentalimbed Pentalimbed commented Jul 16, 2025

Addresses https://github.com/doodlum/skyrim-community-shaders/milestone/1 perf issue

Summary by CodeRabbit

  • Refactor
    • Improved the logic for when fonts are reloaded in the menu overlay, making font reloads more predictable and consistent. No changes to public features or interfaces.

@github-actions
Copy link
Copy Markdown

Using provided base ref: 908117f
Using base ref: 908117f
Base commit date: 2025-07-15T19:13:36-07:00 (Tuesday, July 15, 2025 07:13 PM)
No actionable suggestions for changed features.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jul 16, 2025

Warning

Rate limit exceeded

@Pentalimbed has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 13 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between f139adf and 8e92550.

📒 Files selected for processing (2)
  • src/Menu.cpp (4 hunks)
  • src/Menu.h (1 hunks)

Walkthrough

The changes simplify the logic for reloading fonts in the Menu::DrawOverlay() function by only checking the pendingFontChange flag, removing the previous font size comparison. Additionally, the pendingFontChange flag in the Menu class is now initialized to true instead of false.

Changes

File(s) Change Summary
src/Menu.cpp Simplified font reload condition in Menu::DrawOverlay() to only check pendingFontChange.
src/Menu.h Changed initial value of pendingFontChange from false to true in the Menu class.

Possibly related PRs

Poem

A font flag once waited, now eager and keen,
Ready to reload, with logic more clean.
No more size checking, just one simple gate—
If pending, refresh; if not, then just wait.
The menu feels lighter, the code more serene!
🐇✨

✨ Finishing Touches
  • 📝 Generate Docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@doodlum doodlum merged commit 2c9e3c4 into community-shaders:dev Jul 16, 2025
11 checks passed
@github-actions
Copy link
Copy Markdown

✅ A pre-release build is available for this PR:
Download

alandtse pushed a commit to alandtse/open-shaders that referenced this pull request Jul 20, 2025
@Pentalimbed Pentalimbed deleted the rc-fix-font-rebuild branch July 30, 2025 15:35
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.

2 participants