add: getting screen resolution

useful for ESP
This commit is contained in:
ALittlePatate
2022-10-03 20:19:02 +02:00
parent 52de2909d8
commit 4b629fc3a7
3 changed files with 14 additions and 3 deletions

View File

@@ -1,6 +1,9 @@
#include "Settings.hpp"
namespace settings {
int height = 1080;
int width = 1920;
bool big_flashlight = false;
float flashlight_color[4] = { 255.f, 255.f, 255.f, 255.f };

View File

@@ -5,6 +5,9 @@
#include <string>
namespace settings {
extern int height;
extern int width;
extern bool big_flashlight;
extern float flashlight_color[4];

View File

@@ -9,7 +9,7 @@
#include "Utils/Output/Output.hpp"
#include "Callbacks/OnUpdate.hpp"
#include "Utils/Players/Players.hpp"
#include "Features/ESP/ESP.hpp"
#include "Utils/Objects/Objects.hpp"
#include <IL2CPP_Resolver/il2cpp_resolver.hpp>
@@ -61,12 +61,17 @@ DWORD WINAPI Main() {
CreateHooks();
print("[+] Created hooks\n");
RECT desktop;
const HWND hDesktop = GetDesktopWindow();
GetWindowRect(hDesktop, &desktop);
settings::height = desktop.right;
settings::width = desktop.bottom;
IL2CPP::Callback::Initialize();
IL2CPP::Callback::OnUpdate::Add(OnUpdate);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Players::GetPlayersThread, 0, 0, 0);
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)ESP::PlayerESP, 0, 0, 0); //running in a different thread to help performance
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Objects::GetObjectsThread, 0, 0, 0);
return TRUE;
}