Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes for building with clang-cl and wine headers. #4402

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/d3d8/d3d8_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -973,21 +973,21 @@ namespace dxvk {
float Z,
DWORD Stencil) {
StateChange();
return GetD3D9()->Clear(Count, pRects, Flags, Color, Z, Stencil);
return GetD3D9()->Clear(Count, reinterpret_cast<const d3d9::D3DRECT *>(pRects), Flags, Color, Z, Stencil);
}

HRESULT STDMETHODCALLTYPE D3D8Device::SetTransform(D3DTRANSFORMSTATETYPE State, const D3DMATRIX* pMatrix) {
StateChange();
return GetD3D9()->SetTransform(d3d9::D3DTRANSFORMSTATETYPE(State), pMatrix);
return GetD3D9()->SetTransform(d3d9::D3DTRANSFORMSTATETYPE(State), reinterpret_cast<const d3d9::D3DMATRIX *>(pMatrix));
}

HRESULT STDMETHODCALLTYPE D3D8Device::GetTransform(D3DTRANSFORMSTATETYPE State, D3DMATRIX* pMatrix) {
return GetD3D9()->GetTransform(d3d9::D3DTRANSFORMSTATETYPE(State), pMatrix);
return GetD3D9()->GetTransform(d3d9::D3DTRANSFORMSTATETYPE(State), reinterpret_cast<d3d9::D3DMATRIX *>(pMatrix));
}

HRESULT STDMETHODCALLTYPE D3D8Device::MultiplyTransform(D3DTRANSFORMSTATETYPE TransformState, const D3DMATRIX* pMatrix) {
StateChange();
return GetD3D9()->MultiplyTransform(d3d9::D3DTRANSFORMSTATETYPE(TransformState), pMatrix);
return GetD3D9()->MultiplyTransform(d3d9::D3DTRANSFORMSTATETYPE(TransformState), reinterpret_cast<const d3d9::D3DMATRIX *>(pMatrix));
}

HRESULT STDMETHODCALLTYPE D3D8Device::SetViewport(const D3DVIEWPORT8* pViewport) {
Expand Down
5 changes: 1 addition & 4 deletions src/d3d8/d3d8_include.h
Original file line number Diff line number Diff line change
Expand Up @@ -181,9 +181,6 @@ namespace d3d9 {
#define D3DDEVINFOID_VCACHE 4
#endif

// MinGW headers are broken. Who'dve guessed?
#ifndef _MSC_VER

// Missing from d3d8types.h
#ifndef D3DDEVINFOID_RESOURCEMANAGER
#define D3DDEVINFOID_RESOURCEMANAGER 5
Expand All @@ -197,7 +194,7 @@ namespace d3d9 {
#define D3DPRESENT_RATE_UNLIMITED 0x7FFFFFFF
#endif

#else // _MSC_VER
#ifdef _MSC_VER

// These are enum typedefs in the MinGW headers, but not defined by Microsoft
#define D3DVSDT_TYPE DWORD
Expand Down
2 changes: 1 addition & 1 deletion src/dxvk/dxvk_memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
namespace dxvk {

class DxvkMemoryAllocator;
class DxvkMemoryChunk;
struct DxvkMemoryChunk;
class DxvkSparsePageTable;
class DxvkSharedAllocationCache;
class DxvkResourceAllocation;
Expand Down
2 changes: 1 addition & 1 deletion src/wsi/win32/wsi_monitor_win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ namespace dxvk::wsi {
// Get the device name of the monitor.
MONITORINFOEXW monInfo;
monInfo.cbSize = sizeof(monInfo);
if (!::GetMonitorInfoW(hMonitor, &monInfo)) {
if (!::GetMonitorInfoW(hMonitor, reinterpret_cast<MONITORINFO*>(&monInfo))) {
Logger::err("getMonitorDevicePath: Failed to get monitor info.");
return {};
}
Expand Down
Loading