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 "al_get_render_state" #1583

Merged
merged 3 commits into from
Oct 5, 2024
Merged

Conversation

MarkOates
Copy link
Contributor

@MarkOates MarkOates commented Sep 27, 2024

During some debugging, I noticed I didn't have access to the current render state, which would be helpful. This would be particularly useful in instances where different parts of a game system manage render state differently, and checking for possible leaky render state. The values for it seem to be stored in ALLEGRO_DISPLAY.

Some points to be aware of in this PR:

  • In the refman/, not sure what "Since 5.2.11" to put it under.
  • Not sure about a return value or behavior when there is no current display. This implementation just has it return 0 with no warning or anything.

Copy link
Member

@SiegeLord SiegeLord left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a nice addition, thanks!

src/display.c Outdated Show resolved Hide resolved
src/display.c Outdated Show resolved Hide resolved
@SiegeLord
Copy link
Member

Thanks!

@SiegeLord SiegeLord merged commit 5507155 into liballeg:master Oct 5, 2024
2 of 3 checks passed
@MarkOates
Copy link
Contributor Author

Sweet! I missed the merge notification on this one.

I've already had several times where this would be useful. Thank you!

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