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

Cursor lock crash fix #702

Closed
wants to merge 1 commit into from
Closed

Conversation

naithar
Copy link
Contributor

@naithar naithar commented Oct 18, 2020

In case cursor locking isn't supported by platform (like iOS) winit's window.set_cursor_grab would return Err. Unwrapping it results in panic.
This should fix #697

@cart
Copy link
Member

cart commented Oct 20, 2020

I also hit this bug on wasm. I fixed it in #703 and i think the fix there is slightly safer because it only ignores "unsupported platform" failures, while still hard-failing when a real platform failure is hit.

I'm closing this, but feel free to continue the conversation if you have other thoughts.

@cart cart closed this Oct 20, 2020
@naithar
Copy link
Contributor Author

naithar commented Oct 20, 2020

Yeah, I like your fix more. But it seems like it could still crash at bevy_winit/src/lib.rs if user would call locking code at runtime on unsupported platform.

@karroffel karroffel added C-Bug An unexpected or incorrect behavior A-Windowing Platform-agnostic interface layer to run your app in labels Oct 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Windowing Platform-agnostic interface layer to run your app in C-Bug An unexpected or incorrect behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Crash on iOS
3 participants