Skip to content

Commit 843ccb5

Browse files
committed
remove unused variable
1 parent f76af24 commit 843ccb5

File tree

3 files changed

+1
-29
lines changed

3 files changed

+1
-29
lines changed

RenderstateManager.cpp

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,6 @@ HRESULT RSManager::redirectSetRenderTarget(DWORD RenderTargetIndex,
193193
}
194194
}
195195
}
196-
if (rddp < 4 || rddp > 8)
197-
rddp = 0;
198-
else
199-
rddp++;
200196
return ThrowIfFailed(m_pDevice->SetRenderTarget(RenderTargetIndex, pRenderTarget));
201197
} catch (const std::system_error& err) {
202198
spdlog::error(L"{}", DXGetErrorString9W(err.code().value()));
@@ -267,23 +263,6 @@ void RSManager::measureOcclusionScale() {
267263
ThrowIfFailed(m_pDevice->EndScene());
268264
}
269265

270-
HRESULT RSManager::redirectSetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture) noexcept {
271-
try {
272-
if (pTexture == nullptr)
273-
return ThrowIfFailed(m_pDevice->SetTexture(Stage, pTexture));
274-
if ((rddp == 0 && Stage == 0) || (rddp == 1 && Stage == 1) || (rddp == 2 && Stage == 2) ||
275-
(rddp == 3 && Stage == 3)) {
276-
++rddp;
277-
} else {
278-
rddp = 0;
279-
}
280-
return ThrowIfFailed(m_pDevice->SetTexture(Stage, pTexture));
281-
} catch (const std::system_error& err) {
282-
spdlog::error(L"{}", DXGetErrorString9W(err.code().value()));
283-
return err.code().value();
284-
}
285-
}
286-
287266
unsigned int RSManager::isDof(unsigned width, unsigned height) {
288267
unsigned int topWidth = getDOFResolution() * 16 / 9;
289268
unsigned int topHeight = getDOFResolution();

RenderstateManager.h

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,6 @@ class RSManager {
2424
Microsoft::WRL::ComPtr<IDirect3DSurface9> rgbaBuffer1Surf;
2525
Microsoft::WRL::ComPtr<IDirect3DSurface9> depthStencilSurf;
2626
Microsoft::WRL::ComPtr<IDirect3DSurface9> zSurf;
27-
// RenderDoneDetectionProgress
28-
// basically, when the game switches rendertargets after setting texture 0 to 3
29-
// in order, but no others, we assume we just finished rendering the hud-less
30-
// image. This variable keeps track of the number of "correct" texture
31-
// settings.
32-
unsigned int rddp = 0;
3327
// NumRenderTargetSwitches
3428
// we use the number of switches between rendertargets to figure out where we are
3529
// in the pipeline. Yeah, it's flaky
@@ -74,7 +68,6 @@ class RSManager {
7468

7569
HRESULT redirectSetRenderTarget(DWORD RenderTargetIndex,
7670
IDirect3DSurface9* pRenderTarget) noexcept;
77-
HRESULT redirectSetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture) noexcept;
7871
HRESULT redirectPresent(CONST RECT* pSourceRect, CONST RECT* pDestRect, HWND hDestWindowOverride,
7972
CONST RGNDATA* pDirtyRegion) noexcept;
8073

d3d9dev.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -636,7 +636,7 @@ HRESULT APIENTRY hkIDirect3DDevice9::SetStreamSourceFreq(UINT StreamNumber, UINT
636636
}
637637

638638
HRESULT APIENTRY hkIDirect3DDevice9::SetTexture(DWORD Stage, IDirect3DBaseTexture9* pTexture) {
639-
return m_pRSManager->redirectSetTexture(Stage, pTexture);
639+
return m_pD3Ddev->SetTexture(Stage, pTexture);
640640
}
641641

642642
HRESULT APIENTRY hkIDirect3DDevice9::SetTextureStageState(DWORD Stage,

0 commit comments

Comments
 (0)