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

set_rich_presence not work #114

Closed
colining opened this issue Nov 10, 2022 · 4 comments
Closed

set_rich_presence not work #114

colining opened this issue Nov 10, 2022 · 4 comments

Comments

@colining
Copy link

colining commented Nov 10, 2022

I'm not familiar with rust. but I do some test like this
and i found the code not work ,maybe some package should upgrade ,maybe other reason.

    #[test]
    fn it_works() {
        let value = Some("test");
        let a = value
            .and_then(|v| CString::new(v).ok())
            .map(|s| s.as_ptr() as *const _)
            .unwrap_or(std::ptr::null());
        let c: &CStr = unsafe { CStr::from_ptr(a) };
        println!("........{:#?}", c); 
       // it will print only .......
    }
    #[test]
    fn t_t() {
        let a = CString::new("tttt").unwrap_or_default();
        println!("........{:#?}", a);
        let b = a.as_ptr() as * const c_char;
        println!("........{:#?}", b);
        let c: &CStr = unsafe { CStr::from_ptr(b) };
        println!("........{:#?}", c);
        //it will print ......"test"
    }
@colining
Copy link
Author

colining commented Nov 10, 2022

#58 @Noxime @yancouto

@Braymatter
Copy link

I'm using this library through bevy_steamworks and I can confirm that I'm not able to set rich presence, I don't get an error but the /devtestrichpresence endpoint on steamworks doesn't work either.

@Noxime

@Noxime
Copy link
Owner

Noxime commented Dec 14, 2022

Thank you for the report, sorry for taking so long to get around to it. Fixed in #559c202. Oddly there was no associated crash even though there should have been.

@Noxime Noxime closed this as completed Dec 14, 2022
@johanhelsing
Copy link
Contributor

I also ran into this one today, main seems to work. Maybe make a new crates.io release?

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

No branches or pull requests

4 participants