Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/doitsujin/dxvk.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksey Komarov <q4arus@ya.ru>2023-05-03 14:58:33 +0300
committerGitHub <noreply@github.com>2023-05-03 14:58:33 +0300
commit20356148af70c51cbb258e33f0273ff72b34c383 (patch)
treec049f5556470261cb2af6b4f9c3b1b82f581b754 /include
parentb81536458f52f1c09dbedef2c269832128089c51 (diff)
include: Add few defines and types in windows.h for DXVK Native (#3307)
* windows: add define for ZeroMemory * windows: add few *LP types, DUMMYUNIONNAME*, __C89_NAMELESSSTRUCTNAME --------- Co-authored-by: Joshie <joshua@froggi.es>
Diffstat (limited to 'include')
-rw-r--r--include/native/windows/windows_base.h33
1 files changed, 29 insertions, 4 deletions
diff --git a/include/native/windows/windows_base.h b/include/native/windows/windows_base.h
index 3be09a1b..ac1c441f 100644
--- a/include/native/windows/windows_base.h
+++ b/include/native/windows/windows_base.h
@@ -23,10 +23,13 @@ typedef uint32_t UINT;
typedef int32_t LONG;
typedef uint32_t ULONG;
+typedef int32_t *LPLONG;
typedef int32_t HRESULT;
typedef wchar_t WCHAR;
+typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
+typedef unsigned char UCHAR, *PUCHAR;
typedef INT BOOL;
typedef BOOL WINBOOL;
@@ -35,6 +38,7 @@ typedef uint16_t UINT16;
typedef uint32_t UINT32;
typedef uint64_t UINT64;
typedef void VOID;
+typedef void* PVOID;
typedef void* LPVOID;
typedef const void* LPCVOID;
@@ -92,6 +96,7 @@ inline bool operator!=(const GUID& a, const GUID& b) { return std::memcmp(&a, &b
typedef uint32_t DWORD;
typedef uint16_t WORD;
+typedef DWORD *LPDWORD;
typedef void* HANDLE;
typedef HANDLE HMONITOR;
@@ -113,6 +118,12 @@ typedef uint32_t UINT_PTR;
typedef INT_PTR* PINT_PTR;
typedef UINT_PTR* PUINT_PTR;
+#ifdef STRICT
+#define DECLARE_HANDLE(a) typedef struct a##__ { int unused; } *a
+#else /*STRICT*/
+#define DECLARE_HANDLE(a) typedef HANDLE a
+#endif /*STRICT*/
+
typedef char* LPSTR;
typedef wchar_t* LPWSTR;
typedef const char* LPCSTR;
@@ -135,12 +146,12 @@ typedef struct RECT {
LONG top;
LONG right;
LONG bottom;
-} RECT;
+} RECT,*PRECT,*NPRECT,*LPRECT;
typedef struct SIZE {
LONG cx;
LONG cy;
-} SIZE;
+} SIZE,*PSIZE,*LPSIZE;
typedef union {
struct {
@@ -172,7 +183,7 @@ typedef struct PALETTEENTRY {
BYTE peGreen;
BYTE peBlue;
BYTE peFlags;
-} PALETTEENTRY;
+} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
typedef struct RGNDATAHEADER {
DWORD dwSize;
@@ -185,7 +196,7 @@ typedef struct RGNDATAHEADER {
typedef struct RGNDATA {
RGNDATAHEADER rdh;
char Buffer[1];
-} RGNDATA;
+} RGNDATA,*PRGNDATA,*NPRGNDATA,*LPRGNDATA;
// Ignore these.
#define STDMETHODCALLTYPE
@@ -284,6 +295,7 @@ typedef struct RGNDATA {
#define THIS_
#define THIS
+#define __C89_NAMELESSSTRUCTNAME
#define __C89_NAMELESSUNIONNAME
#define __C89_NAMELESSUNIONNAME1
#define __C89_NAMELESSUNIONNAME2
@@ -296,6 +308,15 @@ typedef struct RGNDATA {
#define __C89_NAMELESS
#define DUMMYUNIONNAME
#define DUMMYSTRUCTNAME
+#define DUMMYUNIONNAME1
+#define DUMMYUNIONNAME2
+#define DUMMYUNIONNAME3
+#define DUMMYUNIONNAME4
+#define DUMMYUNIONNAME5
+#define DUMMYUNIONNAME6
+#define DUMMYUNIONNAME7
+#define DUMMYUNIONNAME8
+#define DUMMYUNIONNAME9
#ifdef __cplusplus
#define DECLARE_INTERFACE(x) struct x
@@ -334,7 +355,11 @@ typedef struct RGNDATA {
#define FAILED(hr) ((HRESULT)(hr) < 0)
#define SUCCEEDED(hr) ((HRESULT)(hr) >= 0)
+#define RtlZeroMemory(Destination,Length) memset((Destination),0,(Length))
+#define ZeroMemory RtlZeroMemory
+
#ifndef DEFINE_ENUM_FLAG_OPERATORS
+
#ifdef __cplusplus
# define DEFINE_ENUM_FLAG_OPERATORS(type) \
extern "C++" \