mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-01-10 14:23:57 +00:00
[host] DEBUG_* string format fixes
This commit is contained in:
parent
524183661d
commit
7691093121
2 changed files with 14 additions and 14 deletions
|
@ -51,7 +51,7 @@ bool DXGI::Initialize(CaptureOptions * options)
|
|||
status = CreateDXGIFactory1(__uuidof(IDXGIFactory1), (void **)(&m_dxgiFactory));
|
||||
if (FAILED(status))
|
||||
{
|
||||
DEBUG_ERROR("Failed to create DXGIFactory: %08x", status);
|
||||
DEBUG_ERROR("Failed to create DXGIFactory: %08x", (int)status);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -150,7 +150,7 @@ bool DXGI::Initialize(CaptureOptions * options)
|
|||
|
||||
if (FAILED(status))
|
||||
{
|
||||
DEBUG_ERROR("DuplicateOutput Failed: %08x", status);
|
||||
DEBUG_ERROR("DuplicateOutput Failed: %08x", (int)status);
|
||||
DeInitialize();
|
||||
return false;
|
||||
}
|
||||
|
@ -172,7 +172,7 @@ bool DXGI::Initialize(CaptureOptions * options)
|
|||
status = m_device->CreateTexture2D(&texDesc, NULL, &m_texture);
|
||||
if (FAILED(status))
|
||||
{
|
||||
DEBUG_ERROR("Failed to create texture: %08x", status);
|
||||
DEBUG_ERROR("Failed to create texture: %08x", (int)status);
|
||||
DeInitialize();
|
||||
return false;
|
||||
}
|
||||
|
@ -286,7 +286,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||
if (!SUCCEEDED(status))
|
||||
{
|
||||
m_dup->ReleaseFrame();
|
||||
DEBUG_ERROR("Failed to get the new pointer shape: %08x", status);
|
||||
DEBUG_ERROR("Failed to get the new pointer shape: %08x", (int)status);
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
@ -350,7 +350,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||
|
||||
default:
|
||||
// unknown failure
|
||||
DEBUG_INFO("AcquireNextFrame failed: %08x", status);
|
||||
DEBUG_INFO("AcquireNextFrame failed: %08x", (int)status);
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
}
|
||||
|
@ -391,7 +391,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||
status = surface->Map(&rect, DXGI_MAP_READ);
|
||||
if (FAILED(status))
|
||||
{
|
||||
DEBUG_ERROR("Failed to map surface: %08x", status);
|
||||
DEBUG_ERROR("Failed to map surface: %08x", (int)status);
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
@ -408,7 +408,7 @@ GrabStatus DXGI::GrabFrame(FrameInfo & frame)
|
|||
|
||||
if (FAILED(status))
|
||||
{
|
||||
DEBUG_ERROR("Failed to unmap surface: %08x", status);
|
||||
DEBUG_ERROR("Failed to unmap surface: %08x", (int)status);
|
||||
return GRAB_STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
|
|
@ -112,7 +112,7 @@ void IVSHMEM::DeInitialize()
|
|||
if (m_gotMemory)
|
||||
{
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_RELEASE_MMAP, NULL, 0, NULL, 0, NULL, NULL))
|
||||
DEBUG_ERROR("DeviceIoControl failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl failed: %d", (int)GetLastError());
|
||||
m_memory = NULL;
|
||||
}
|
||||
|
||||
|
@ -143,7 +143,7 @@ UINT64 IVSHMEM::GetSize()
|
|||
IVSHMEM_SIZE size;
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REQUEST_SIZE, NULL, 0, &size, sizeof(IVSHMEM_SIZE), NULL, NULL))
|
||||
{
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", (int)GetLastError());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ UINT16 IVSHMEM::GetPeerID()
|
|||
IVSHMEM_PEERID peerID;
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REQUEST_SIZE, NULL, 0, &peerID, sizeof(IVSHMEM_PEERID), NULL, NULL))
|
||||
{
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", (int)GetLastError());
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -195,7 +195,7 @@ void * IVSHMEM::GetMemory()
|
|||
ZeroMemory(&map, sizeof(IVSHMEM_MMAP));
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REQUEST_MMAP, NULL, 0, &map, sizeof(IVSHMEM_MMAP), NULL, NULL))
|
||||
{
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", (int)GetLastError());
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
@ -219,7 +219,7 @@ HANDLE IVSHMEM::CreateVectorEvent(UINT16 vector)
|
|||
HANDLE event = CreateEvent(NULL, TRUE, FALSE, NULL);
|
||||
if (event == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
DEBUG_ERROR("CreateEvent Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("CreateEvent Failed: %d", (int)GetLastError());
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
||||
|
@ -230,7 +230,7 @@ HANDLE IVSHMEM::CreateVectorEvent(UINT16 vector)
|
|||
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_REGISTER_EVENT, &msg, sizeof(IVSHMEM_EVENT), NULL, 0, NULL, NULL))
|
||||
{
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", (int)GetLastError());
|
||||
CloseHandle(event);
|
||||
return INVALID_HANDLE_VALUE;
|
||||
}
|
||||
|
@ -249,7 +249,7 @@ bool IVSHMEM::RingDoorbell(UINT16 peerID, UINT16 door)
|
|||
|
||||
if (!DeviceIoControl(m_handle, IOCTL_IVSHMEM_RING_DOORBELL, &msg, sizeof(IVSHMEM_RING), NULL, 0, NULL, NULL))
|
||||
{
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", GetLastError());
|
||||
DEBUG_ERROR("DeviceIoControl Failed: %d", (int)GetLastError());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue