mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-18 04:54:15 +01:00
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>
This commit is contained in:
parent
b81536458f
commit
20356148af
@ -23,10 +23,13 @@ typedef uint32_t UINT;
|
|||||||
|
|
||||||
typedef int32_t LONG;
|
typedef int32_t LONG;
|
||||||
typedef uint32_t ULONG;
|
typedef uint32_t ULONG;
|
||||||
|
typedef int32_t *LPLONG;
|
||||||
|
|
||||||
typedef int32_t HRESULT;
|
typedef int32_t HRESULT;
|
||||||
|
|
||||||
typedef wchar_t WCHAR;
|
typedef wchar_t WCHAR;
|
||||||
|
typedef WCHAR *NWPSTR, *LPWSTR, *PWSTR;
|
||||||
|
typedef unsigned char UCHAR, *PUCHAR;
|
||||||
|
|
||||||
typedef INT BOOL;
|
typedef INT BOOL;
|
||||||
typedef BOOL WINBOOL;
|
typedef BOOL WINBOOL;
|
||||||
@ -35,6 +38,7 @@ typedef uint16_t UINT16;
|
|||||||
typedef uint32_t UINT32;
|
typedef uint32_t UINT32;
|
||||||
typedef uint64_t UINT64;
|
typedef uint64_t UINT64;
|
||||||
typedef void VOID;
|
typedef void VOID;
|
||||||
|
typedef void* PVOID;
|
||||||
typedef void* LPVOID;
|
typedef void* LPVOID;
|
||||||
typedef const void* LPCVOID;
|
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 uint32_t DWORD;
|
||||||
typedef uint16_t WORD;
|
typedef uint16_t WORD;
|
||||||
|
typedef DWORD *LPDWORD;
|
||||||
|
|
||||||
typedef void* HANDLE;
|
typedef void* HANDLE;
|
||||||
typedef HANDLE HMONITOR;
|
typedef HANDLE HMONITOR;
|
||||||
@ -113,6 +118,12 @@ typedef uint32_t UINT_PTR;
|
|||||||
typedef INT_PTR* PINT_PTR;
|
typedef INT_PTR* PINT_PTR;
|
||||||
typedef UINT_PTR* PUINT_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 char* LPSTR;
|
||||||
typedef wchar_t* LPWSTR;
|
typedef wchar_t* LPWSTR;
|
||||||
typedef const char* LPCSTR;
|
typedef const char* LPCSTR;
|
||||||
@ -135,12 +146,12 @@ typedef struct RECT {
|
|||||||
LONG top;
|
LONG top;
|
||||||
LONG right;
|
LONG right;
|
||||||
LONG bottom;
|
LONG bottom;
|
||||||
} RECT;
|
} RECT,*PRECT,*NPRECT,*LPRECT;
|
||||||
|
|
||||||
typedef struct SIZE {
|
typedef struct SIZE {
|
||||||
LONG cx;
|
LONG cx;
|
||||||
LONG cy;
|
LONG cy;
|
||||||
} SIZE;
|
} SIZE,*PSIZE,*LPSIZE;
|
||||||
|
|
||||||
typedef union {
|
typedef union {
|
||||||
struct {
|
struct {
|
||||||
@ -172,7 +183,7 @@ typedef struct PALETTEENTRY {
|
|||||||
BYTE peGreen;
|
BYTE peGreen;
|
||||||
BYTE peBlue;
|
BYTE peBlue;
|
||||||
BYTE peFlags;
|
BYTE peFlags;
|
||||||
} PALETTEENTRY;
|
} PALETTEENTRY, *PPALETTEENTRY, *LPPALETTEENTRY;
|
||||||
|
|
||||||
typedef struct RGNDATAHEADER {
|
typedef struct RGNDATAHEADER {
|
||||||
DWORD dwSize;
|
DWORD dwSize;
|
||||||
@ -185,7 +196,7 @@ typedef struct RGNDATAHEADER {
|
|||||||
typedef struct RGNDATA {
|
typedef struct RGNDATA {
|
||||||
RGNDATAHEADER rdh;
|
RGNDATAHEADER rdh;
|
||||||
char Buffer[1];
|
char Buffer[1];
|
||||||
} RGNDATA;
|
} RGNDATA,*PRGNDATA,*NPRGNDATA,*LPRGNDATA;
|
||||||
|
|
||||||
// Ignore these.
|
// Ignore these.
|
||||||
#define STDMETHODCALLTYPE
|
#define STDMETHODCALLTYPE
|
||||||
@ -284,6 +295,7 @@ typedef struct RGNDATA {
|
|||||||
#define THIS_
|
#define THIS_
|
||||||
#define THIS
|
#define THIS
|
||||||
|
|
||||||
|
#define __C89_NAMELESSSTRUCTNAME
|
||||||
#define __C89_NAMELESSUNIONNAME
|
#define __C89_NAMELESSUNIONNAME
|
||||||
#define __C89_NAMELESSUNIONNAME1
|
#define __C89_NAMELESSUNIONNAME1
|
||||||
#define __C89_NAMELESSUNIONNAME2
|
#define __C89_NAMELESSUNIONNAME2
|
||||||
@ -296,6 +308,15 @@ typedef struct RGNDATA {
|
|||||||
#define __C89_NAMELESS
|
#define __C89_NAMELESS
|
||||||
#define DUMMYUNIONNAME
|
#define DUMMYUNIONNAME
|
||||||
#define DUMMYSTRUCTNAME
|
#define DUMMYSTRUCTNAME
|
||||||
|
#define DUMMYUNIONNAME1
|
||||||
|
#define DUMMYUNIONNAME2
|
||||||
|
#define DUMMYUNIONNAME3
|
||||||
|
#define DUMMYUNIONNAME4
|
||||||
|
#define DUMMYUNIONNAME5
|
||||||
|
#define DUMMYUNIONNAME6
|
||||||
|
#define DUMMYUNIONNAME7
|
||||||
|
#define DUMMYUNIONNAME8
|
||||||
|
#define DUMMYUNIONNAME9
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
#define DECLARE_INTERFACE(x) struct x
|
#define DECLARE_INTERFACE(x) struct x
|
||||||
@ -334,7 +355,11 @@ typedef struct RGNDATA {
|
|||||||
#define FAILED(hr) ((HRESULT)(hr) < 0)
|
#define FAILED(hr) ((HRESULT)(hr) < 0)
|
||||||
#define SUCCEEDED(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
|
#ifndef DEFINE_ENUM_FLAG_OPERATORS
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
# define DEFINE_ENUM_FLAG_OPERATORS(type) \
|
# define DEFINE_ENUM_FLAG_OPERATORS(type) \
|
||||||
extern "C++" \
|
extern "C++" \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user