mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-19 14:52:10 +01:00
[d3d9] Fix (most) cursor-related Wine tests
This commit is contained in:
parent
7ff5321910
commit
bbe82aa534
@ -40,6 +40,10 @@ namespace dxvk {
|
||||
|
||||
|
||||
BOOL D3D9Cursor::ShowCursor(BOOL bShow) {
|
||||
// Cursor visibility remains unchanged (typically FALSE) if the cursor isn't set.
|
||||
if (unlikely(m_hCursor == nullptr && m_sCursor.Width == 0 && m_sCursor.Height == 0))
|
||||
return m_visible;
|
||||
|
||||
if (likely(m_hCursor != nullptr))
|
||||
::SetCursor(bShow ? m_hCursor : nullptr);
|
||||
|
||||
|
@ -345,9 +345,19 @@ namespace dxvk {
|
||||
uint32_t inputWidth = cursorTex->Desc()->Width;
|
||||
uint32_t inputHeight = cursorTex->Desc()->Height;
|
||||
|
||||
// Always use a hardware cursor when windowed.
|
||||
// Check if surface dimensions are powers of two.
|
||||
if ((inputWidth && (inputWidth & (inputWidth - 1)))
|
||||
|| (inputHeight && (inputHeight & (inputHeight - 1))))
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
D3DPRESENT_PARAMETERS params;
|
||||
m_implicitSwapchain->GetPresentParameters(¶ms);
|
||||
|
||||
if (inputWidth > params.BackBufferWidth
|
||||
|| inputHeight > params.BackBufferHeight)
|
||||
return D3DERR_INVALIDCALL;
|
||||
|
||||
// Always use a hardware cursor when windowed.
|
||||
bool hwCursor = params.Windowed;
|
||||
|
||||
// Always use a hardware cursor w/h <= 32 px
|
||||
|
Loading…
x
Reference in New Issue
Block a user