Use VkString in vk debug

This commit is contained in:
hodasemi 2023-04-09 23:07:15 +02:00
parent ea5bcef9a9
commit 5db1d534a6

View file

@ -12,7 +12,6 @@ use std::os::raw::c_char;
use std::os::raw::c_void;
use std::ffi::CStr;
use std::ffi::CString;
Extensions!(InstanceExtensions, {
(xlib_surface, "VK_KHR_xlib_surface"),
@ -433,9 +432,8 @@ impl Instance {
}
};
let tmp1 = unsafe { CString::from_raw(msg as *mut c_char) };
let tmp2 = match tmp1.into_string() {
Ok(string) => string,
let s = match VkString::try_from(msg) {
Ok(s) => s,
Err(err) => {
println!("{}", err);
@ -444,7 +442,7 @@ impl Instance {
};
output += " ):\n\t";
output += tmp2.as_ref();
output += s.as_str();
println!("{}", output);