aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/util
diff options
context:
space:
mode:
authoruniboi <64006268+uniboi@users.noreply.github.com>2023-01-21 10:36:55 +0000
committerGitHub <noreply@github.com>2023-01-21 10:36:55 +0000
commit9b6731de9a0980515d1d8954f46935a1445dcf02 (patch)
tree7dca50d57b17518e0e4cd1ebbb421e9c92b602c0 /NorthstarDLL/util
parent3a6162627155ec48244c5870729c67fd201e6d6f (diff)
downloadNorthstarLauncher-9b6731de9a0980515d1d8954f46935a1445dcf02.tar.gz
NorthstarLauncher-9b6731de9a0980515d1d8954f46935a1445dcf02.zip
Expose Cursor Position to UI vm (#387)
* add NSGetCursorPosition * fix vs filters * fix clang formatting * Create wininfo.h * Create wininfo.cpp * add wininfo to compiler options * add wininfo to filters * move wininfo * clamp position to screen size
Diffstat (limited to 'NorthstarDLL/util')
-rw-r--r--NorthstarDLL/util/wininfo.cpp11
-rw-r--r--NorthstarDLL/util/wininfo.h6
2 files changed, 17 insertions, 0 deletions
diff --git a/NorthstarDLL/util/wininfo.cpp b/NorthstarDLL/util/wininfo.cpp
new file mode 100644
index 00000000..991deb33
--- /dev/null
+++ b/NorthstarDLL/util/wininfo.cpp
@@ -0,0 +1,11 @@
+#include "pch.h"
+
+AUTOHOOK_INIT()
+
+HWND* g_gameHWND;
+HMODULE g_NorthstarModule = 0;
+
+ON_DLL_LOAD("engine.dll", WinInfo, (CModule module))
+{
+ g_gameHWND = module.Offset(0x7d88a0).As<HWND*>();
+}
diff --git a/NorthstarDLL/util/wininfo.h b/NorthstarDLL/util/wininfo.h
new file mode 100644
index 00000000..ac417034
--- /dev/null
+++ b/NorthstarDLL/util/wininfo.h
@@ -0,0 +1,6 @@
+#pragma once
+#pragma once
+#include "pch.h"
+
+extern HWND* g_gameHWND;
+extern HMODULE g_NorthstarModule;