From 57c269f6f2202ca396bcbf9b6e8fffcd93e4db7c Mon Sep 17 00:00:00 2001 From: BobTheBob <32057864+BobTheBob9@users.noreply.github.com> Date: Wed, 15 Dec 2021 05:06:36 +0000 Subject: dedi ShowWindow patch --- NorthstarDedicatedTest/dedicated.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'NorthstarDedicatedTest/dedicated.cpp') diff --git a/NorthstarDedicatedTest/dedicated.cpp b/NorthstarDedicatedTest/dedicated.cpp index 4c263d0c..f7b6f325 100644 --- a/NorthstarDedicatedTest/dedicated.cpp +++ b/NorthstarDedicatedTest/dedicated.cpp @@ -437,6 +437,24 @@ void InitialiseDedicated(HMODULE engineAddress) CommandLine()->AppendParm("-noshaderapi", 0); } + else + { + // for dedis where we still create a window, we can at least hide the window we create + // not great since we still run renderthread etc, but better than nothing + + { + // IVideoMode::CreateGameWindow + char* ptr = (char*)engineAddress + 0x1CD146; + TempReadWrite rw(ptr); + + // nop call to ShowWindow + *ptr = (char)0x90; + *(ptr + 1) = (char)0x90; + *(ptr + 2) = (char)0x90; + *(ptr + 3) = (char)0x90; + *(ptr + 4) = (char)0x90; + } + } CDedicatedExports* dedicatedExports = new CDedicatedExports; dedicatedExports->vtable = dedicatedExports; -- cgit v1.2.3