steamworks-rs icon indicating copy to clipboard operation
steamworks-rs copied to clipboard

set_rich_presence not work

Open colining opened this issue 2 years ago • 1 comments

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 avatar Nov 10 '22 08:11 colining

#58 @Noxime @yancouto

colining avatar Nov 10 '22 08:11 colining

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

Braymatter avatar Dec 12 '22 21:12 Braymatter

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 avatar Dec 14 '22 02:12 Noxime

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

johanhelsing avatar Feb 13 '23 06:02 johanhelsing