mirror of
https://github.com/spice2x/spice2x.github.io.git
synced 2026-08-04 07:40:42 -07:00
graphics: address perf issues with DX9 image resize logic (#712)
## Link to GitHub Issue or related Pull Request, if one exists n/a ## Description of change Move resize logic from `EndScene` to `Present`/`PresentEx` (resolves Live2D frame drops in some extreme settings) Plug small memory leak Remove unnecessary surface Lock/Unlock ## Testing Tested IIDX, SDVX, DDR.
This commit is contained in:
@@ -35,6 +35,10 @@ static const GUID IID_WrappedIDirect3DDevice9 = {
|
||||
0x6dec0d40, 0x1339, 0x4bda, { 0xa5, 0xf2, 0x22, 0x31, 0xd4, 0x1, 0xf, 0xd1 }
|
||||
};
|
||||
|
||||
// applies the image resize / orientation swap by copying the back buffer through an
|
||||
// oversized intermediate surface and back. expects the real (unwrapped) device.
|
||||
void SurfaceHook(IDirect3DDevice9 *pReal);
|
||||
|
||||
struct WrappedIDirect3DDevice9 : IDirect3DDevice9Ex {
|
||||
explicit WrappedIDirect3DDevice9(HWND hFocusWindow, IDirect3DDevice9 *orig)
|
||||
: hFocusWindow(hFocusWindow), pReal(orig), is_d3d9ex(false) {
|
||||
|
||||
Reference in New Issue
Block a user