|
|
@ -54,7 +54,6 @@ void SteamTarget::init()
|
|
|
|
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
|
|
|
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
|
|
|
|
readIni();
|
|
|
|
readIni();
|
|
|
|
target_overlay_.init(!enable_overlay_, enable_overlay_only_config_, max_fps_);
|
|
|
|
target_overlay_.init(!enable_overlay_, enable_overlay_only_config_, max_fps_);
|
|
|
|
initOverlayEvents();
|
|
|
|
|
|
|
|
if (!use_desktop_conf_)
|
|
|
|
if (!use_desktop_conf_)
|
|
|
|
fgwinhook::patchForegroundWindow();
|
|
|
|
fgwinhook::patchForegroundWindow();
|
|
|
|
controller_thread_ = std::make_unique<VirtualControllerThread>(update_rate_);
|
|
|
|
controller_thread_ = std::make_unique<VirtualControllerThread>(update_rate_);
|
|
|
@ -66,6 +65,9 @@ void SteamTarget::init()
|
|
|
|
if (launch_game_)
|
|
|
|
if (launch_game_)
|
|
|
|
launchApplication();
|
|
|
|
launchApplication();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
initOverlayEvents();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
sys_tray_icon_.setIcon(QIcon(":/SteamTarget/Resources/GloSC_Icon.png"));
|
|
|
|
sys_tray_icon_.setIcon(QIcon(":/SteamTarget/Resources/GloSC_Icon.png"));
|
|
|
|
tray_icon_menu_.addAction("Quit");
|
|
|
|
tray_icon_menu_.addAction("Quit");
|
|
|
|
sys_tray_icon_.setContextMenu(&tray_icon_menu_);
|
|
|
|
sys_tray_icon_.setContextMenu(&tray_icon_menu_);
|
|
|
@ -170,22 +172,9 @@ void SteamTarget::initOverlayEvents()
|
|
|
|
|
|
|
|
|
|
|
|
if (addressOpen != 0)
|
|
|
|
if (addressOpen != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
DWORD addressClosed = 0;
|
|
|
|
DWORD addressClosed = hook_commons::FindPattern(overlay_module_name,
|
|
|
|
|
|
|
|
overlay_closed_func_sig,
|
|
|
|
for (DWORD i = 0; i < 1024; i++) //search next signature relativ to "addressOpened"
|
|
|
|
overlay_closed_func_mask);
|
|
|
|
{
|
|
|
|
|
|
|
|
bool found = true;
|
|
|
|
|
|
|
|
for (DWORD j = 0; j < std::string(overlay_closed_func_mask).length(); j++)
|
|
|
|
|
|
|
|
found &=
|
|
|
|
|
|
|
|
overlay_closed_func_mask[j] == '?' ||
|
|
|
|
|
|
|
|
overlay_closed_func_sig[j] == *reinterpret_cast<char*>(addressOpen + j + i);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (found)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
addressClosed = addressOpen + i;
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (addressClosed != 0)
|
|
|
|
if (addressClosed != 0)
|
|
|
|
{
|
|
|
|
{
|
|
|
|