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

Error checking fix for ClipboardUtil::set_clipboard_text #737

Merged
merged 1 commit into from
Dec 12, 2017
Merged

Error checking fix for ClipboardUtil::set_clipboard_text #737

merged 1 commit into from
Dec 12, 2017

Conversation

kyren
Copy link
Contributor

@kyren kyren commented Dec 11, 2017

SDL_SetClipboardText returns 0 on success, not failure. Before this
fix, calling set_clipboard_text successfully would generally return
Err("").

SDL_SetClipboardText returns 0 on success, not failure.  Before this
fix, calling set_clipboard_text successfully would generally return
Err("").
@Cobrand
Copy link
Member

Cobrand commented Dec 12, 2017

sigh this has not been noticed since this commit, which was 2 years ago. And even then it had the wrong version.

Thanks for the PR kyren, appreciate it. I'll update the changelog for you.

Tell me if you want this change to be propagated to crates.io soon.

@Cobrand Cobrand merged commit 871700e into Rust-SDL2:master Dec 12, 2017
Cobrand added a commit that referenced this pull request Dec 12, 2017
@kyren
Copy link
Contributor Author

kyren commented Dec 13, 2017

Thank you for the quick merge! It's not a super big deal for us at least that there be a crates.io release soon, it's very easy to workaround by just ignoring the returned error. If you think it warrants a 0.31.1 release, it would be convenient, but don't go out of your way if it's hugely annoying.

@Cobrand
Copy link
Member

Cobrand commented Dec 13, 2017

If there are no other PRs during the next week I'll definitely do this.

In the meantime, you can use this in your Cargo.toml:

[dependencies.sdl2]
git = "https://github.com/rust-sdl2/rust-sdl2"
rev = "35b4931f98f8541e9c67cbd19e800de85315b796" # Dec 11st, 2017 master revision

Cheers.

sypwex pushed a commit to sypwex/rust-sdl2 that referenced this pull request Jun 2, 2024
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