Wanted to first just say thanks for everyone's (not sure if-anyone/who helps Dege but ty!) hard work on this project!! It helps our game community so very much!
Brief context:
I'm a dev for Windower (Hi again!), a third-party tool for Final Fantasy XI.
We've had an issue for a long time involving taking screenshots when DGVoodoo2 is in use.
In a nutshell we:
1) Grab the screen buffer with `Direct3DDevice8->GetBackBuffer`
2) Write it out with `D3DXSaveSurfaceToFileA` (as a BMP)
Issue:
The issue is that, this works perfectly without dgvoodoo2, but with it, we don't get a file created at all.
Question(s):
Any idea what could possibly be going wrong?
Permissions issue seems unlikely (as the program is running as administrator).
Is the buffer not where we think it is when dgvoodoo2 is in use?
Is `D3DXSaveSurfaceToFileA` not available?
Also accepting generic debugging advice.
Thanks!
hey
seem like problem lies within your buffer location, debug it.
Debug it how exactly?
The buffer works flawlessly without dgvoodoo2.
So the question is, how could/would using dgvoodoo2 modify the inner workings to relocate buffer 0 (and why?)? Because that's where it comes from. https://learn.microsoft.com/en-us/previ ... v=msdn.10)
And it works for me with the latest dgv release (2.82.3), I get a test.bmp with a pure green bitmap.
Unfortunately I cannot test FFXI. What are the device creation parameters? Maybe there is something 'special' about them?
You could check out if you get an error with the _dbg version. I get the following log when calling into D3DXSaveSurfaceToFileA:
1Direct3DSurface8::GetDesc (this = 0ED36348, pDesc = 0047F7C4) 2DebugSetMute () 3[dgVoodoo] WARNING: DebugSetMute: This function has no effect on debug output of dgVoodoo. 4Direct3DSurface8::GetContainer (this = 0ED36348, ppContainer = 0047F810) 5Direct3DDevice8::QueryInterface (this = 0EC714D0) 6Direct3DDevice8::Release (this = 0EC714D0) 7DebugSetMute () 8[dgVoodoo] WARNING: DebugSetMute: This function has no effect on debug output of dgVoodoo. 9Direct3DSurface8::GetDevice (this = 0ED36348) 10Direct3DDevice8::QueryInterface (this = 0EC714D0) 11Direct3DDevice8::CreateImageSurface (this = 0EC714D0, Width = 1280, Height = 1024, Format = D3DFMT_X8R8G8B8, ppSurface = 0047F8F4) 12Direct3DSurface8::QueryInterface (this = 0EFE39E0) 13Direct3DDevice8::AddRef (this = 0EC714D0) 14[dgVoodoo] INFO: Direct3DDevice8 (0EC714D0)::CreateImageSurface: Direct3DSurface8 (0EFE39E0, IDirect3DSurface8 = 0EFE3B0C) is created. 15Direct3DDevice8::CopyRects (this = 0EC714D0, pSourceSurface = 0ED36474, pSourceRectsArray = 00000000, cRects = 0, pDestinationSurface = 0EFE3B0C, pDestPointsArray = 00000000) 16Direct3DSurface8::LockRect (this = 0EFE39E0, pLockedRect = 0047F804, pRect = 00000000, Flags = 0x810) 17Direct3DSurface8::UnlockRect (this = 0EFE39E0) 18Direct3DSurface8::Release (this = 0EFE39E0) 19[dgVoodoo] INFO: Direct3DSurface8 (0EFE39E0) is released. 20Direct3DDevice8::Release (this = 0EC714D0) 21Direct3DDevice8::Release (this = 0EC714D0)