aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/dedicated.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-15 05:06:36 +0000
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-12-15 05:06:36 +0000
commit57c269f6f2202ca396bcbf9b6e8fffcd93e4db7c (patch)
treec5a30ae171a14abca5ae8f80c0c2757d429a83f3 /NorthstarDedicatedTest/dedicated.cpp
parent3492008d7b55f342ea2d7191ca2301d7597c5127 (diff)
downloadNorthstarLauncher-57c269f6f2202ca396bcbf9b6e8fffcd93e4db7c.tar.gz
NorthstarLauncher-57c269f6f2202ca396bcbf9b6e8fffcd93e4db7c.zip
dedi ShowWindow patch
Diffstat (limited to 'NorthstarDedicatedTest/dedicated.cpp')
-rw-r--r--NorthstarDedicatedTest/dedicated.cpp18
1 files changed, 18 insertions, 0 deletions
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;