mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-11 09:58:10 +00:00
[idd] driver: fix failure to track last pointer ID
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
Some checks failed
build / client (Debug, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Debug, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:clang cxx:clang++], xdg-shell) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], libdecor) (push) Has been cancelled
build / client (Release, map[cc:gcc cxx:g++], xdg-shell) (push) Has been cancelled
build / module (push) Has been cancelled
build / host-linux (push) Has been cancelled
build / host-windows-cross (push) Has been cancelled
build / host-windows-native (push) Has been cancelled
build / obs (clang) (push) Has been cancelled
build / obs (gcc) (push) Has been cancelled
build / docs (push) Has been cancelled
This commit is contained in:
@@ -288,6 +288,32 @@ DWORD CALLBACK CSwapChainProcessor::_CursorThread(LPVOID arg)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool CSwapChainProcessor::QueryHWCursor()
|
||||||
|
{
|
||||||
|
IDARG_IN_QUERY_HWCURSOR in = {};
|
||||||
|
in.LastShapeId = m_lastShapeId;
|
||||||
|
in.pShapeBuffer = m_shapeBuffer;
|
||||||
|
in.ShapeBufferSizeInBytes = 512 * 512 * 4;
|
||||||
|
|
||||||
|
IDARG_OUT_QUERY_HWCURSOR out = {};
|
||||||
|
NTSTATUS status = IddCxMonitorQueryHardwareCursor(m_monitor, &in, &out);
|
||||||
|
if (FAILED(status))
|
||||||
|
{
|
||||||
|
// this occurs if the display went away (ie, screen blanking or disabled)
|
||||||
|
if (status == ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
DEBUG_ERROR("IddCxMonitorQueryHardwareCursor failed (0x%08x)", status);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (out.IsCursorShapeUpdated)
|
||||||
|
m_lastShapeId = out.CursorShapeInfo.ShapeId;
|
||||||
|
|
||||||
|
m_devContext->SendCursor(out, m_shapeBuffer);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
void CSwapChainProcessor::CursorThread()
|
void CSwapChainProcessor::CursorThread()
|
||||||
{
|
{
|
||||||
HRESULT hr = 0;
|
HRESULT hr = 0;
|
||||||
@@ -311,7 +337,9 @@ void CSwapChainProcessor::CursorThread()
|
|||||||
|
|
||||||
// cursorDataEvent
|
// cursorDataEvent
|
||||||
case WAIT_OBJECT_0:
|
case WAIT_OBJECT_0:
|
||||||
break;
|
if (!QueryHWCursor())
|
||||||
|
return;
|
||||||
|
continue;
|
||||||
|
|
||||||
// terminateEvent
|
// terminateEvent
|
||||||
case WAIT_OBJECT_0 + 1:
|
case WAIT_OBJECT_0 + 1:
|
||||||
@@ -323,24 +351,5 @@ void CSwapChainProcessor::CursorThread()
|
|||||||
DEBUG_ERROR_HR(hr, "WaitForMultipleObjects");
|
DEBUG_ERROR_HR(hr, "WaitForMultipleObjects");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
IDARG_IN_QUERY_HWCURSOR in = {};
|
|
||||||
in.LastShapeId = m_lastShapeId;
|
|
||||||
in.pShapeBuffer = m_shapeBuffer;
|
|
||||||
in.ShapeBufferSizeInBytes = 512 * 512 * 4;
|
|
||||||
|
|
||||||
IDARG_OUT_QUERY_HWCURSOR out = {};
|
|
||||||
NTSTATUS status = IddCxMonitorQueryHardwareCursor(m_monitor, &in, &out);
|
|
||||||
if (FAILED(status))
|
|
||||||
{
|
|
||||||
// this occurs if the display went away (ie, screen blanking or disabled)
|
|
||||||
if (status == ERROR_GRAPHICS_PATH_NOT_IN_TOPOLOGY)
|
|
||||||
return;
|
|
||||||
|
|
||||||
DEBUG_ERROR("IddCxMonitorQueryHardwareCursor failed (0x%08x)", status);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
m_devContext->SendCursor(out, m_shapeBuffer);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@@ -60,6 +60,7 @@ private:
|
|||||||
void SwapChainThreadCore();
|
void SwapChainThreadCore();
|
||||||
|
|
||||||
static DWORD CALLBACK _CursorThread(LPVOID arg);
|
static DWORD CALLBACK _CursorThread(LPVOID arg);
|
||||||
|
bool QueryHWCursor();
|
||||||
void CursorThread();
|
void CursorThread();
|
||||||
|
|
||||||
static void CompletionFunction(
|
static void CompletionFunction(
|
||||||
|
Reference in New Issue
Block a user