virtual display: win10 debug windows.

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou
2022-03-13 16:42:31 +08:00
parent 1eb696356e
commit 957eabcef0
2 changed files with 42 additions and 4 deletions

View File

@@ -97,6 +97,9 @@ pub fn is_device_created() -> bool {
#[cfg(windows)]
pub fn create_device() -> ResultType<()> {
if is_device_created() {
return Ok(());
}
unsafe {
let mut h_sw_device = *H_SW_DEVICE.lock().unwrap() as win10::idd::HSWDEVICE;
if win10::idd::DeviceCreate(&mut h_sw_device) == win10::idd::FALSE {