summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorboris <wzn@moneybot.cc>2019-01-01 21:04:09 +1300
committerboris <wzn@moneybot.cc>2019-01-01 21:04:09 +1300
commit16b4fd429ecaf259c4e2bd7307431f3c855812e8 (patch)
tree315216180267392a233f64fdf9de7f2ab9ebafac
parent00b271f265450850336c8bcfdacc8671dbc8406a (diff)
yep
-rw-r--r--csgo-loader/csgo-client/Security/RuntimeSecurity.cpp11
-rw-r--r--csgo-loader/csgo-client/UserExperience/UserInterface.cpp6
-rw-r--r--csgo-loader/csgo-client/UserExperience/UserInterface.hpp6
3 files changed, 10 insertions, 13 deletions
diff --git a/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp b/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp
index f7c1cc2..572c9b1 100644
--- a/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp
+++ b/csgo-loader/csgo-client/Security/RuntimeSecurity.cpp
@@ -315,7 +315,7 @@ namespace Security
for(size_t j{}; j < Length; ++j)
{
if(strstr(DriverName, BlackListedDrivers[j]))
- ERROR_ASSERT(BlackListReasons[j]);
+ SecurityCallback(BlackListReasons[j]);
}
}
}
@@ -404,14 +404,11 @@ namespace Security
if(!TriggeredCallback)
{
-
// You can use the reason parameters to debug the security in case
// something weird starts going on with it.
- char Buffer[2048];
- sprintf_s(Buffer, STR("Security callback was called. Reason parameter: \"%s\"\n"), Reason);
-
- MessageBoxA(0, Buffer, "", MB_ICONINFORMATION | MB_OK);
-
+ std::ofstream File("loader.err");
+ File.write(Reason, strlen(Reason));
+ File.close();
// The process will straight up die on Release mode.
// Compile with FuckMSVC to debug this.
diff --git a/csgo-loader/csgo-client/UserExperience/UserInterface.cpp b/csgo-loader/csgo-client/UserExperience/UserInterface.cpp
index 24f92c4..d36fb8d 100644
--- a/csgo-loader/csgo-client/UserExperience/UserInterface.cpp
+++ b/csgo-loader/csgo-client/UserExperience/UserInterface.cpp
@@ -70,8 +70,6 @@ namespace UserExperience
return result;
}
- void UserInterface::RunUiFrame()
- {
- g_window.on_frame();
- }
+ void UserInterface::RunUiFrame() { g_window.on_frame(); }
+ HWND UserInterface::GetWindow() { return g_window.get_hwnd(); }
} \ No newline at end of file
diff --git a/csgo-loader/csgo-client/UserExperience/UserInterface.hpp b/csgo-loader/csgo-client/UserExperience/UserInterface.hpp
index aaa4b10..dc18b57 100644
--- a/csgo-loader/csgo-client/UserExperience/UserInterface.hpp
+++ b/csgo-loader/csgo-client/UserExperience/UserInterface.hpp
@@ -66,6 +66,8 @@ namespace UserExperience
// Creates an UI thread, call only once.
void RunUiFrame();
+
+ HWND GetWindow();
};
using UserInterfacePtr = std::unique_ptr<UserInterface>;
@@ -75,5 +77,5 @@ extern UserExperience::UserInterfacePtr UserInterface;
// Sick macros, retard.
-#define ERROR_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(0, Buffer, "", MB_ICONERROR); ExitProcess(0); }
-#define INFO_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(0, Buffer, "", MB_OK); ExitProcess(0); }
+#define ERROR_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(UserInterface->GetWindow(), Buffer, "", MB_SYSTEMMODAL | MB_ICONERROR); ExitProcess(0); }
+#define INFO_ASSERT(Error, ...) { char Buffer[1024 * 16]; sprintf_s(Buffer, sizeof Buffer, Error, __VA_ARGS__); MessageBoxA(UserInterface->GetWindow(), Buffer, "", MB_SYSTEMMODAL | MB_OK); ExitProcess(0); }