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

Fix SDL examples crashes #10470

Merged
merged 2 commits into from
Mar 7, 2021
Merged

Conversation

megatux
Copy link
Contributor

@megatux megatux commented Mar 3, 2021

Tried the SDL tv example and after some seconds it crashed with overflow in the #to_int32 surface method leaving X session on the example app graphics resolution.
First, added an ensure block with SDL #quit to restore previous resolution on crashes.
Then, replaced #to_int32 with #to_int32! to do overflow wrapping.

For fire example, I did same #to_int32! replacement.

@megatux megatux changed the title Fix SDL example crash & ensure clean graphics shutdown Fix SDL examples crashes Mar 3, 2021
Copy link
Member

@sdogruyol sdogruyol left a comment

Choose a reason for hiding this comment

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

Thanks @megatux 🙏

@sdogruyol sdogruyol merged commit a94a823 into crystal-lang:master Mar 7, 2021
@asterite
Copy link
Member

asterite commented Mar 7, 2021

Serdar! 👋

@sdogruyol
Copy link
Member

Hey everyone 👋

@bcardiff bcardiff added this to the 1.0.0 milestone Mar 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants