From bf99127ee3376b06e8b7ee328ed29ce2d0be16ce Mon Sep 17 00:00:00 2001 From: Joshua Ashton Date: Sun, 21 Aug 2022 18:41:51 +0000 Subject: [PATCH] [d3d9] Stub out cursor code on non-Windows platforms --- src/d3d9/d3d9_cursor.cpp | 19 +++++++++++++++++++ src/d3d9/d3d9_cursor.h | 2 ++ 2 files changed, 21 insertions(+) diff --git a/src/d3d9/d3d9_cursor.cpp b/src/d3d9/d3d9_cursor.cpp index 408268c16..798104b3f 100644 --- a/src/d3d9/d3d9_cursor.cpp +++ b/src/d3d9/d3d9_cursor.cpp @@ -5,6 +5,7 @@ namespace dxvk { +#ifdef _WIN32 void D3D9Cursor::UpdateCursor(int X, int Y) { POINT currentPos = { }; if (::GetCursorPos(¤tPos) && currentPos == POINT{ X, Y }) @@ -43,5 +44,23 @@ namespace dxvk { return D3D_OK; } +#else + void D3D9Cursor::UpdateCursor(int X, int Y) { + Logger::warn("D3D9Cursor::UpdateCursor: Not supported on current platform."); + } + + + BOOL D3D9Cursor::ShowCursor(BOOL bShow) { + Logger::warn("D3D9Cursor::ShowCursor: Not supported on current platform."); + return std::exchange(m_visible, bShow); + } + + + HRESULT D3D9Cursor::SetHardwareCursor(UINT XHotSpot, UINT YHotSpot, const CursorBitmap& bitmap) { + Logger::warn("D3D9Cursor::SetHardwareCursor: Not supported on current platform."); + + return D3D_OK; + } +#endif } \ No newline at end of file diff --git a/src/d3d9/d3d9_cursor.h b/src/d3d9/d3d9_cursor.h index 32645d26c..d69e39748 100644 --- a/src/d3d9/d3d9_cursor.h +++ b/src/d3d9/d3d9_cursor.h @@ -26,7 +26,9 @@ namespace dxvk { BOOL m_visible = FALSE; +#ifdef _WIN32 HCURSOR m_hCursor = nullptr; +#endif };