Use VkString in vk debug
This commit is contained in:
parent
ea5bcef9a9
commit
5db1d534a6
1 changed files with 3 additions and 5 deletions
|
@ -12,7 +12,6 @@ use std::os::raw::c_char;
|
||||||
use std::os::raw::c_void;
|
use std::os::raw::c_void;
|
||||||
|
|
||||||
use std::ffi::CStr;
|
use std::ffi::CStr;
|
||||||
use std::ffi::CString;
|
|
||||||
|
|
||||||
Extensions!(InstanceExtensions, {
|
Extensions!(InstanceExtensions, {
|
||||||
(xlib_surface, "VK_KHR_xlib_surface"),
|
(xlib_surface, "VK_KHR_xlib_surface"),
|
||||||
|
@ -433,9 +432,8 @@ impl Instance {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let tmp1 = unsafe { CString::from_raw(msg as *mut c_char) };
|
let s = match VkString::try_from(msg) {
|
||||||
let tmp2 = match tmp1.into_string() {
|
Ok(s) => s,
|
||||||
Ok(string) => string,
|
|
||||||
Err(err) => {
|
Err(err) => {
|
||||||
println!("{}", err);
|
println!("{}", err);
|
||||||
|
|
||||||
|
@ -444,7 +442,7 @@ impl Instance {
|
||||||
};
|
};
|
||||||
|
|
||||||
output += " ):\n\t";
|
output += " ):\n\t";
|
||||||
output += tmp2.as_ref();
|
output += s.as_str();
|
||||||
|
|
||||||
println!("{}", output);
|
println!("{}", output);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue