DewRecode icon indicating copy to clipboard operation
DewRecode copied to clipboard

Dedicated server mode still requires DX9

Open emoose opened this issue 9 years ago • 5 comments

DX9 is still inited/used in dedicated server mode, trying to run it on a WinServer box with no graphics card stops it from running, with the last message in the log file saying "Core.Direct3D.Init event triggered"

If we want proper dedicated servers we'll need to stop D3D from being used somehow

emoose avatar Nov 01 '15 04:11 emoose

@emoose could we not use something like "3D-Analyze" to trick the game into thinking there is graphics card, as a quick fix?

twist84 avatar Nov 01 '15 09:11 twist84

Hmm, didn't know there were apps like that, tried 3D Analyze but didn't seem to work.. It'd be best if we could disable the DX9 stuff anyway, less resources needed etc.

emoose avatar Nov 02 '15 18:11 emoose

The easiest way would probably be to write a custom D3D9 interface stubbing out all of the calls returning success for each and then hooking the initialization function(s) to replace the ptr stored in-game at 0x50DADDC (and possibly other places) with the stubbed out empty version instead. That way game calls will still succeed as if there's GPU hardware present and everything is controlled from a central location.

Ernegien avatar Nov 02 '15 18:11 Ernegien

I was thinking that too, would take some time to write it up though.. I wonder if there's any other open-source null D3D9 interfaces we can use...

emoose avatar Nov 02 '15 21:11 emoose

Fixed in 9d6f69627462fc50080b597fd7987fb32486c24d, thanks to Shockfire for finding the null d3d bool!

Going to leave this open though until we can get it tested under WINE, hopefully it should work great.

emoose avatar Nov 04 '15 07:11 emoose