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

[d3d8] Use D3D8 compatibilty mode to set HUD API level #4664

Open
wants to merge 1 commit 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
2 changes: 0 additions & 2 deletions src/d3d8/d3d8_device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ namespace dxvk {
throw DxvkError("D3D8Device: ERROR! Failed to get D3D9 Bridge. d3d9.dll might not be DXVK!");
}

m_bridge->SetAPIName("D3D8");

ResetState();
RecreateBackBuffersAndAutoDepthStencil();

Expand Down
4 changes: 0 additions & 4 deletions src/d3d9/d3d9_bridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ namespace dxvk {
return m_device->QueryInterface(riid, ppvObject);
}

void DxvkD3D8Bridge::SetAPIName(const char* name) {
m_device->m_implicitSwapchain->SetApiName(name);
}

HRESULT DxvkD3D8Bridge::UpdateTextureFromBuffer(
IDirect3DSurface9* pDestSurface,
IDirect3DSurface9* pSrcSurface,
Expand Down
9 changes: 0 additions & 9 deletions src/d3d9/d3d9_bridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,6 @@ IDxvkD3D8Bridge : public IUnknown {
using IDirect3DSurface9 = d3d9::IDirect3DSurface9;
#endif

/**
* \brief Changes the API name displayed on the HUD
*
* \param [in] name The new API name
*/
virtual void SetAPIName(const char* name) = 0;

/**
* \brief Updates a D3D9 surface from a D3D9 buffer
*
Expand Down Expand Up @@ -87,8 +80,6 @@ namespace dxvk {
REFIID riid,
void** ppvObject);

void SetAPIName(const char* name);

HRESULT UpdateTextureFromBuffer(
IDirect3DSurface9* pDestSurface,
IDirect3DSurface9* pSrcSurface,
Expand Down
8 changes: 2 additions & 6 deletions src/d3d9/d3d9_swapchain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1121,11 +1121,6 @@ namespace dxvk {
m_wctx->frameLatencySignal->wait(m_wctx->frameId - GetActualFrameLatency());
}

void D3D9SwapChainEx::SetApiName(const char* name) {
if (m_apiHud && name)
m_apiHud->setApiName(name);
}

uint32_t D3D9SwapChainEx::GetActualFrameLatency() {
uint32_t maxFrameLatency = m_parent->GetFrameLatency();

Expand Down Expand Up @@ -1356,7 +1351,8 @@ namespace dxvk {


std::string D3D9SwapChainEx::GetApiName() {
return this->GetParent()->IsExtended() ? "D3D9Ex" : "D3D9";
return this->GetParent()->IsD3D8Compatible() ? "D3D8" :
this->GetParent()->IsExtended() ? "D3D9Ex" : "D3D9";
}


Expand Down
2 changes: 0 additions & 2 deletions src/d3d9/d3d9_swapchain.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,6 @@ namespace dxvk {

void DestroyBackBuffers();

void SetApiName(const char* name);

bool UpdateWindowCtx();

private:
Expand Down
6 changes: 0 additions & 6 deletions src/dxvk/hud/dxvk_hud_item.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,6 @@ namespace dxvk::hud {
}


void HudClientApiItem::setApiName(std::string api) {
std::lock_guard lock(m_mutex);
m_api = std::move(api);
}


HudPos HudClientApiItem::render(
const DxvkContextObjects& ctx,
const HudPipelineKey& key,
Expand Down
2 changes: 0 additions & 2 deletions src/dxvk/hud/dxvk_hud_item.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ namespace dxvk::hud {

~HudClientApiItem();

void setApiName(std::string api);

HudPos render(
const DxvkContextObjects& ctx,
const HudPipelineKey& key,
Expand Down