2019-12-16 03:28:01 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "d3d9_include.h"
|
|
|
|
|
|
|
|
namespace dxvk {
|
|
|
|
|
|
|
|
constexpr uint32_t HardwareCursorWidth = 32u;
|
|
|
|
constexpr uint32_t HardwareCursorHeight = 32u;
|
|
|
|
constexpr uint32_t HardwareCursorFormatSize = 4u;
|
|
|
|
constexpr uint32_t HardwareCursorPitch = HardwareCursorWidth * HardwareCursorFormatSize;
|
|
|
|
|
|
|
|
// Format Size of 4 bytes (ARGB)
|
|
|
|
using CursorBitmap = uint8_t[HardwareCursorHeight * HardwareCursorPitch];
|
|
|
|
|
|
|
|
class D3D9Cursor {
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
void UpdateCursor(int X, int Y);
|
|
|
|
|
|
|
|
BOOL ShowCursor(BOOL bShow);
|
|
|
|
|
|
|
|
HRESULT SetHardwareCursor(UINT XHotSpot, UINT YHotSpot, const CursorBitmap& bitmap);
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
BOOL m_visible = FALSE;
|
|
|
|
|
2022-08-21 18:41:51 +00:00
|
|
|
#ifdef _WIN32
|
2019-12-16 03:28:01 +00:00
|
|
|
HCURSOR m_hCursor = nullptr;
|
2022-08-21 18:41:51 +00:00
|
|
|
#endif
|
2019-12-16 03:28:01 +00:00
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|