1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-23 10:54:14 +01:00

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

This commit is contained in:
WinterSnowfall 2025-02-02 00:50:41 +02:00 committed by Philip Rebohle
parent 8860bde34b
commit dd5b28e557
7 changed files with 2 additions and 31 deletions

View File

@ -51,8 +51,6 @@ namespace dxvk {
throw DxvkError("D3D8Device: ERROR! Failed to get D3D9 Bridge. d3d9.dll might not be DXVK!"); throw DxvkError("D3D8Device: ERROR! Failed to get D3D9 Bridge. d3d9.dll might not be DXVK!");
} }
m_bridge->SetAPIName("D3D8");
ResetState(); ResetState();
RecreateBackBuffersAndAutoDepthStencil(); RecreateBackBuffersAndAutoDepthStencil();

View File

@ -28,10 +28,6 @@ namespace dxvk {
return m_device->QueryInterface(riid, ppvObject); return m_device->QueryInterface(riid, ppvObject);
} }
void DxvkD3D8Bridge::SetAPIName(const char* name) {
m_device->m_implicitSwapchain->SetApiName(name);
}
HRESULT DxvkD3D8Bridge::UpdateTextureFromBuffer( HRESULT DxvkD3D8Bridge::UpdateTextureFromBuffer(
IDirect3DSurface9* pDestSurface, IDirect3DSurface9* pDestSurface,
IDirect3DSurface9* pSrcSurface, IDirect3DSurface9* pSrcSurface,

View File

@ -21,13 +21,6 @@ IDxvkD3D8Bridge : public IUnknown {
using IDirect3DSurface9 = d3d9::IDirect3DSurface9; using IDirect3DSurface9 = d3d9::IDirect3DSurface9;
#endif #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 * \brief Updates a D3D9 surface from a D3D9 buffer
* *
@ -87,8 +80,6 @@ namespace dxvk {
REFIID riid, REFIID riid,
void** ppvObject); void** ppvObject);
void SetAPIName(const char* name);
HRESULT UpdateTextureFromBuffer( HRESULT UpdateTextureFromBuffer(
IDirect3DSurface9* pDestSurface, IDirect3DSurface9* pDestSurface,
IDirect3DSurface9* pSrcSurface, IDirect3DSurface9* pSrcSurface,

View File

@ -1121,11 +1121,6 @@ namespace dxvk {
m_wctx->frameLatencySignal->wait(m_wctx->frameId - GetActualFrameLatency()); 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 D3D9SwapChainEx::GetActualFrameLatency() {
uint32_t maxFrameLatency = m_parent->GetFrameLatency(); uint32_t maxFrameLatency = m_parent->GetFrameLatency();
@ -1356,7 +1351,8 @@ namespace dxvk {
std::string D3D9SwapChainEx::GetApiName() { std::string D3D9SwapChainEx::GetApiName() {
return this->GetParent()->IsExtended() ? "D3D9Ex" : "D3D9"; return this->GetParent()->IsD3D8Compatible() ? "D3D8" :
this->GetParent()->IsExtended() ? "D3D9Ex" : "D3D9";
} }

View File

@ -136,8 +136,6 @@ namespace dxvk {
void DestroyBackBuffers(); void DestroyBackBuffers();
void SetApiName(const char* name);
bool UpdateWindowCtx(); bool UpdateWindowCtx();
private: private:

View File

@ -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( HudPos HudClientApiItem::render(
const DxvkContextObjects& ctx, const DxvkContextObjects& ctx,
const HudPipelineKey& key, const HudPipelineKey& key,

View File

@ -171,8 +171,6 @@ namespace dxvk::hud {
~HudClientApiItem(); ~HudClientApiItem();
void setApiName(std::string api);
HudPos render( HudPos render(
const DxvkContextObjects& ctx, const DxvkContextObjects& ctx,
const HudPipelineKey& key, const HudPipelineKey& key,