summaryrefslogtreecommitdiffstats
path: root/src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h')
-rw-r--r--src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h b/src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h
new file mode 100644
index 00000000..1b541d14
--- /dev/null
+++ b/src/libs/dxvk-native-1.9.2a/src/d3d9/d3d9_cursor.h
@@ -0,0 +1,35 @@
+#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;
+
+#ifndef DXVK_NATIVE
+ HCURSOR m_hCursor = nullptr;
+#endif
+
+ };
+
+} \ No newline at end of file