1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-18 20:52:10 +01:00

[d3d9] Stub out cursor code on non-Windows platforms

This commit is contained in:
Joshua Ashton 2022-08-21 18:41:51 +00:00
parent c6c8acb000
commit bf99127ee3
2 changed files with 21 additions and 0 deletions

View File

@ -5,6 +5,7 @@
namespace dxvk {
#ifdef _WIN32
void D3D9Cursor::UpdateCursor(int X, int Y) {
POINT currentPos = { };
if (::GetCursorPos(&currentPos) && 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
}

View File

@ -26,7 +26,9 @@ namespace dxvk {
BOOL m_visible = FALSE;
#ifdef _WIN32
HCURSOR m_hCursor = nullptr;
#endif
};