MCPcopy Create free account
hub / github.com/aliasIsolation/aliasIsolation / ResizeBuffers_hook

Function ResizeBuffers_hook

src/dll/rendering.cpp:233–259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

231// ----------------------------------------------------------------------------------------------------------------
232
233HRESULT WINAPI ResizeBuffers_hook(IDXGISwapChain *swapChain, UINT BufferCount, UINT Width, UINT Height,
234 DXGI_FORMAT NewFormat, UINT SwapChainFlags)
235{
236 ZoneScopedN(__FUNCTION__);
237
238 g_alienResources.cbDefaultXSC = nullptr;
239 g_alienResources.cbDefaultVSC = nullptr;
240 g_alienResources.cbDefaultPSC = nullptr;
241 g_alienResources.mappedCbDefaultXSC = nullptr;
242 g_alienResources.mappedCbDefaultVSC = nullptr;
243 g_alienResources.mappedCbDefaultPSC = nullptr;
244 g_alienResources.velocitySrv = nullptr;
245 g_alienResources.mainTexView = nullptr;
246
247 g_frameConstants.screenWidth = Width;
248 g_frameConstants.screenHeight = Height;
249
250 releaseResourceViews();
251
252 Menu::CleanupRenderTarget();
253
254 HRESULT hr = g_d3dHookOrig.ResizeBuffers(swapChain, BufferCount, Width, Height, NewFormat, SwapChainFlags);
255
256 Menu::CreateRenderTarget();
257
258 return hr;
259}
260
261// ----------------------------------------------------------------------------------------------------------------
262

Callers

nothing calls this directly

Calls 1

releaseResourceViewsFunction · 0.85

Tested by

no test coverage detected