crosire / d3d8to9

A D3D8 pseudo-driver which converts API calls and bytecode shaders to equivalent D3D9 ones.
BSD 2-Clause "Simplified" License
875 stars 77 forks source link

Switching out of game via Windows key not working anymore since 1.9.0.0 #84

Closed Xan05 closed 5 years ago

Xan05 commented 5 years ago

I've been using this tool with UT2004 without any issues up to 1.8.0, but 1.9.0 broke switching out of the game, as it now crashes with an error message upon reentering the game. Win7 x64, GTX 1060 398.36.

elishacloud commented 5 years ago

I am running the GOG version of the game on Windows 10 and it seems to work fine. I am not getting any crashes when task switching. Which version of the game are you using?

Also can you try this version of d3d8to9: d3d8.zip

Xan05 commented 5 years ago

I'm using the DVD version. Same issue with the file you posted.

The error message:

UT2004 Build UT2004Build[2005-11-23_16.22]

OS: Windows NT 6.1 (Build: 7601) CPU: GenuineIntel PentiumPro-class processor @ 3410 MHz with 4095MB RAM Video: NVIDIA GeForce GTX 1060 6GB (9836)

General protection fault!

History: SetViewport <- UD3DRenderDevice::Lock <- UViewport::Lock <- UWindowsViewport::Lock <- UGameEngine::Draw <- UWindowsViewport::Repaint <- UWindowsClient::Tick <- ClientTick <- UGameEngine::Tick <- Level Untitled <- UpdateWorld <- MainLoop <- FMallocWindows::Free <- FMallocWindows::Realloc <- 10910191 0 FArray <- FArray::Realloc <- 0*2 <- FMallocWindows::Free

crosire commented 5 years ago

This sounds like pCurrentRenderTarget is destroyed when leaving the game and upon reentering d3d8to9 tries to access that in D3D8Device::SetViewport (since it is not nullptr) which crashes. We probably need to set pCurrentRenderTarget to nullptr in D3D8Device::Reset.

CookiePLMonster commented 5 years ago

We probably need to set pCurrentRenderTarget to nullptr in D3D8Device::Reset.

That sounds logical IMO.

crosire commented 5 years ago

Try this: d3d8.zip.

Xan05 commented 5 years ago

Issue fixed with the new version.