This repository has been archived by the owner on Aug 31, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* On d3d9ex IDirect3DDevice9::Reset() isn't called, thus we need to also hook IDirect3DDevice9Ex::ResetEx() so that our textures are recreated properly on switching in-game resolution etc.
- Loading branch information
Showing
5 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#include "../../inc.h" | ||
|
||
HRESULT __stdcall hook::ResetEx( IDirect3DDevice9Ex *device, D3DPRESENT_PARAMETERS *pPresentationParameters, D3DDISPLAYMODEEX *pFullscreenDisplayMode ) { | ||
g_renderer.get_renderer( ).PreD3DReset( ); | ||
|
||
const long ret = g_hooks.m_directx.get_old_method< fn::ResetEx_t >( hook::idx::RESETEX )( device, pPresentationParameters, pFullscreenDisplayMode); | ||
|
||
g_renderer.get_renderer( ).PostD3DReset( ); | ||
|
||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters