steamworks-rs
steamworks-rs copied to clipboard
set_rich_presence not work
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"
}
#58 @Noxime @yancouto
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
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.
I also ran into this one today, main seems to work. Maybe make a new crates.io release?