aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/hooks.cpp
diff options
context:
space:
mode:
authorGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 01:02:11 +0200
committerGeckoEidechse <gecko.eidechse+git@pm.me>2022-09-09 01:02:11 +0200
commit44a6e0230002ae8a55167453a3ff3283a59b1859 (patch)
treea6e4f8eff0f4b2f3723a9ae097d4f242a78fd278 /NorthstarDLL/hooks.cpp
parentd2907aa522d56a4baacec1c17426f7d6f1fae3a2 (diff)
downloadNorthstarLauncher-44a6e0230002ae8a55167453a3ff3283a59b1859.tar.gz
NorthstarLauncher-44a6e0230002ae8a55167453a3ff3283a59b1859.zip
Add clang-format ignores for AUTOHOOKrefactor-format-ignore-autohook
The proper solution would be to have some way in clang-format config file that specifies that our `AUTOHOOK` formatting should be considered correct but that takes more investigation and simply ignoring formatting in AUTOHOOK macros is the lower hanging fruit.
Diffstat (limited to 'NorthstarDLL/hooks.cpp')
-rw-r--r--NorthstarDLL/hooks.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/NorthstarDLL/hooks.cpp b/NorthstarDLL/hooks.cpp
index f0ea74e9..893d47a3 100644
--- a/NorthstarDLL/hooks.cpp
+++ b/NorthstarDLL/hooks.cpp
@@ -182,8 +182,10 @@ void MakeHook(LPVOID pTarget, LPVOID pDetour, void* ppOriginal, const char* pFun
spdlog::error("MH_CreateHook failed for function {}", pStrippedFuncName);
}
+// clang-format off
AUTOHOOK_ABSOLUTEADDR(_GetCommandLineA, GetCommandLineA,
LPSTR, WINAPI, ())
+// clang-format on
{
static char* cmdlineModified;
static char* cmdlineOrg;
@@ -352,8 +354,10 @@ void CallAllPendingDLLLoadCallbacks()
}
}
+// clang-format off
AUTOHOOK_ABSOLUTEADDR(_LoadLibraryExA, LoadLibraryExA,
HMODULE, WINAPI, (LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags))
+// clang-format on
{
HMODULE moduleAddress = _LoadLibraryExA(lpLibFileName, hFile, dwFlags);
@@ -364,8 +368,10 @@ HMODULE, WINAPI, (LPCSTR lpLibFileName, HANDLE hFile, DWORD dwFlags))
}
+// clang-format off
AUTOHOOK_ABSOLUTEADDR(_LoadLibraryA, LoadLibraryA,
HMODULE, WINAPI, (LPCSTR lpLibFileName))
+// clang-format on
{
HMODULE moduleAddress = _LoadLibraryA(lpLibFileName);
@@ -375,8 +381,10 @@ HMODULE, WINAPI, (LPCSTR lpLibFileName))
return moduleAddress;
}
+// clang-format off
AUTOHOOK_ABSOLUTEADDR(_LoadLibraryExW, LoadLibraryExW,
HMODULE, WINAPI, (LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags))
+// clang-format on
{
HMODULE moduleAddress = _LoadLibraryExW(lpLibFileName, hFile, dwFlags);
@@ -386,8 +394,10 @@ HMODULE, WINAPI, (LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags))
return moduleAddress;
}
+// clang-format off
AUTOHOOK_ABSOLUTEADDR(_LoadLibraryW, LoadLibraryW,
HMODULE, WINAPI, (LPCWSTR lpLibFileName))
+// clang-format on
{
HMODULE moduleAddress = _LoadLibraryW(lpLibFileName);