Skip to content

Commit

Permalink
[SDK][WIN32SS] Make Them Build
Browse files Browse the repository at this point in the history
  • Loading branch information
DarkFire01 committed Oct 19, 2024
1 parent f233eb8 commit b6aae04
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 5 deletions.
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,8 @@ Enable this if the module uses typeid or dynamic_cast. You will probably need to
-D_WIN32_WINDOWS=0x502
-D_SETUPAPI_VER=0x502
-DMINGW_HAS_SECURE_API=1
-DD3D_UMD_INTERFACE_VERSION=0x000C # Vista
-DDXGKDDI_INTERFACE_VERSION=0x1052 # Vista
-DDLL_EXPORT_VERSION=${DLL_EXPORT_VERSION})

# Arch Options
Expand Down
6 changes: 5 additions & 1 deletion sdk/include/ddk/d3dkmthk.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ typedef OBJECT_ATTRIBUTES *POBJECT_ATTRIBUTES;
// Available only for Vista (LONGHORN) and later and for
// multiplatform tools such as debugger extensions
//
#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL)
#if defined(__REACTOS__) || ((NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL))

typedef struct _D3DKMT_CREATEDEVICEFLAGS
{
Expand Down Expand Up @@ -5649,11 +5649,15 @@ typedef _Check_return_ NTSTATUS (APIENTRY *PFND3DKMT_CANCELPRESENTS)(_In_ D3DKMT

#endif

#ifdef __REACTOS__
#if (DXGKDDI_INTERFACE_VERSION >= DXGKDDI_INTERFACE_VERSION_WDDM2_2)
EXTERN_C _Check_return_ NTSTATUS APIENTRY D3DKMTShareObjectWithHost(_Inout_ D3DKMT_SHAREOBJECTWITHHOST*);
EXTERN_C _Check_return_ NTSTATUS APIENTRY D3DKMTCreateSyncFile(_Inout_ D3DKMT_CREATESYNCFILE*);

// Used in WSL to close the internal file descriptor to /dev/dxg
EXTERN_C VOID APIENTRY D3DKMTCloseDxCoreDevice();
#endif // DXGKDDI_INTERFACE_VERSION_WDDM3_0
#endif // __REACTOS__

#if !defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL)

Expand Down
16 changes: 15 additions & 1 deletion sdk/include/psdk/d3dkmdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@

#include "d3dukmdt.h"

#ifndef __REACTOS__

#define NTSTATUS int32_t

/*
Expand Down Expand Up @@ -74,6 +76,14 @@ typedef enum _DEVICE_POWER_STATE {
PowerDeviceMaximum
} DEVICE_POWER_STATE, *PDEVICE_POWER_STATE;

#else

#ifndef NTSTATUS
typedef LONG NTSTATUS;
#endif

#endif // !__REACTOS__

#pragma region Desktop Family
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)

Expand All @@ -85,7 +95,7 @@ typedef enum _DEVICE_POWER_STATE {
// Available only for Vista (LONGHORN) and later and for
// multiplatform tools such as debugger extensions
//
#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL)
#if defined(__REACTOS__) || ((NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL))

//
// Hardcoded overlay count
Expand Down Expand Up @@ -600,7 +610,11 @@ typedef struct _D3DKMDT_VIDEO_SIGNAL_INFO
struct
{
// Scan line ordering (e.g. progressive, interlaced).
#ifdef __REACTOS__
UINT ScanLineOrdering : 3; // D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING
#else
D3DDDI_VIDEO_SIGNAL_SCANLINE_ORDERING ScanLineOrdering : 3;
#endif

// Vertical refresh frequency divider
UINT VSyncFreqDivider : 6;
Expand Down
2 changes: 1 addition & 1 deletion sdk/include/psdk/d3dukmdt.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ typedef union _D3DKMT_PTR_TYPE
// Available only for Vista (LONGHORN) and later and for
// multiplatform tools such as debugger extensions
//
#if (NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL)
#if defined(__REACTOS__) || ((NTDDI_VERSION >= NTDDI_LONGHORN) || defined(D3DKMDT_SPECIAL_MULTIPLATFORM_TOOL))

typedef ULONGLONG D3DGPU_VIRTUAL_ADDRESS;
typedef ULONGLONG D3DGPU_SIZE_T;
Expand Down
4 changes: 2 additions & 2 deletions win32ss/gdi/gdi32_vista/dc.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@
/***********************************************************************
* D3DKMTCreateDCFromMemory (GDI32.@)
*/
DWORD WINAPI D3DKMTCreateDCFromMemory( D3DKMT_CREATEDCFROMMEMORY *desc )
NTSTATUS APIENTRY D3DKMTCreateDCFromMemory(_Inout_ D3DKMT_CREATEDCFROMMEMORY* desc)
{
return NtGdiDdDDICreateDCFromMemory( desc );
}

DWORD WINAPI D3DKMTDestroyDCFromMemory( const D3DKMT_DESTROYDCFROMMEMORY *desc )
NTSTATUS APIENTRY D3DKMTDestroyDCFromMemory(_In_ CONST D3DKMT_DESTROYDCFROMMEMORY* desc)
{
return NtGdiDdDDIDestroyDCFromMemory( desc );
}

0 comments on commit b6aae04

Please sign in to comment.