2
0
mirror of https://github.com/Thracky/GlosSI.git synced 2024-11-03 09:40:18 +00:00

Fix: Injector \ SteamTarget: Not beeing able to hook Steam for some people

This commit is contained in:
Peter Repukat 2016-12-04 21:43:31 +01:00
parent 9983ba974a
commit 19445c3ad3
3 changed files with 7 additions and 6 deletions

View File

@ -49,7 +49,7 @@ private:
QList<UWPPair> uwpPairs;
const unsigned int GLOSC_VERSION = 0x00000111;
const unsigned int GLOSC_VERSION = 0x00000112;
private slots:
void on_pbSave_clicked();

View File

@ -7,7 +7,6 @@
int wmain(int argc, wchar_t* argv[])
{
if (argc < 2)
{
std::wcout << "Missing arguments" << std::endl;
@ -44,8 +43,7 @@ int wmain(int argc, wchar_t* argv[])
return 1;
}
if (std::wstring(argv[1]) == L"--inject")
if (std::wstring(argv[1]).find(L"--inject") != std::wstring::npos)
{
int result = Injector::Inject(pid, libPath);
switch (result)
@ -70,7 +68,7 @@ int wmain(int argc, wchar_t* argv[])
break;
}
}
else if (std::wstring(argv[1]) == L"--eject")
else if (std::wstring(argv[1]).find(L"--eject") != std::wstring::npos)
{
int result = Injector::Eject(pid, libPath);
switch (result)

View File

@ -255,8 +255,11 @@ void SteamTargetRenderer::hookBindings()
QProcess proc;
proc.setNativeArguments(" --inject ");
proc.start(dir + "\\Injector.exe", QIODevice::ReadOnly);
proc.setWorkingDirectory(dir);
proc.start("..\\Injector.exe", QIODevice::ReadOnly);
proc.waitForStarted();
proc.waitForFinished();
if (QString::fromStdString(proc.readAll().toStdString()).contains("Inject success!")) //if we have injected (and patched the function)
{
std::cout << "Successfully hooked Steam!" << std::endl;