Skip to content

Commit

Permalink
Detect if helper.exe is present
Browse files Browse the repository at this point in the history
  • Loading branch information
BttrDrgn committed May 14, 2022
1 parent f51d42e commit c286682
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
2 changes: 2 additions & 0 deletions src/app/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ std::uint32_t global::start;
#else
bool global::hide = false;
HWND global::hwnd;
#ifndef HELPER
kiero::RenderType::Enum global::renderer;
#endif
#endif
2 changes: 2 additions & 0 deletions src/app/global.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ class global
#else
static bool hide;
static HWND hwnd;
#ifndef HELPER
static kiero::RenderType::Enum renderer;
#endif
#endif
};
6 changes: 6 additions & 0 deletions src/app/hook/hook.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ bool hook::load(process_t proc)
#ifdef _M_AMD64
if (!proc.arch.compare("x86"))
{
if (!fs::exists("x86/helper.exe"))
{
global::msg_box("Radio.Garten Overlay", "helper.exe is missing from the x86 folder!\nPlease try downloading the latest version and try again.");
return false;
}

ShellExecuteA(0, "open", "x86\\helper.exe", &logger::va("--pid %i --arch %s --hwnd %u --winver %u --auto %i", proc.pid, &proc.arch[0], proc.hwnd, global::winver, hook::auto_refresh)[0], 0, 1);
hook::injected_apps.emplace_back(proc);
return true;
Expand Down
4 changes: 0 additions & 4 deletions src/app/stdafx.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,6 @@
#include <backends/imgui_impl_sdl.h>
#include <backends/imgui_impl_sdlrenderer.h>
#else
#include <d3d9.h>
#include <d3d10.h>
#include <d3d11.h>

#include <MinHook.h>
#include <kiero.h>

Expand Down

0 comments on commit c286682

Please sign in to comment.