Merge branch 'v2'

experimental
Peter Repukat 6 years ago
commit 0780385821

@ -0,0 +1,9 @@
SET QTDIR="C:\Qt\5.10.1\msvc2015"
SET APPVEYOR_BUILD_FOLDER="D:\Alia5\Documents\Visual Studio Projects\GloSC"
"C:\Program Files\7-Zip\7z.exe" a GloSC.zip TargetConfig.ini License.txt qt-license.txt Readme.md Build_Install.md %APPVEYOR_BUILD_FOLDER%\build\Win32\Release\*.exe %APPVEYOR_BUILD_FOLDER%\build\Win32\Release\*.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x86\bin\sfml-system-2.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x86\bin\sfml-window-2.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x86\bin\sfml-graphics-2.dll redist\* %QTDIR%\bin\Qt5Core.dll %QTDIR%\bin\Qt5Gui.dll %QTDIR%\bin\Qt5Widgets.dll %QTDIR%\plugins\platforms\qwindows.dll
"C:\Program Files\7-Zip\7z.exe" rn GloSC.zip qwindows.dll platforms\qwindows.dll
"C:\Program Files\7-Zip\7z.exe" rn GloSC.zip redist/libeay32.dll libeay32.dll
"C:\Program Files\7-Zip\7z.exe" rn GloSC.zip redist/ssleay32.dll ssleay32.dll

@ -1,6 +0,0 @@
SET QTDIR="C:\Qt\5.9\msvc2017_64"
SET APPVEYOR_BUILD_FOLDER="D:\Alia5\Documents\Visual Studio Projects\GloSC"
"C:\Program Files\7-Zip\7z.exe" a GloSC_x64.zip TargetConfig.ini License.txt qt-license.txt Readme.md Build_Install.md %APPVEYOR_BUILD_FOLDER%\build\x64\Release\*.exe %APPVEYOR_BUILD_FOLDER%\build\Win32Only\Release\*.exe %APPVEYOR_BUILD_FOLDER%\build\Win32Only\Release\*.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x64\bin\sfml-system-2.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x64\bin\sfml-window-2.dll %APPVEYOR_BUILD_FOLDER%\dependencies\SFML-2.4.2-x64\bin\sfml-graphics-2.dll redist\* %QTDIR%\bin\Qt5Core.dll %QTDIR%\bin\Qt5Gui.dll %QTDIR%\bin\Qt5Widgets.dll %QTDIR%\plugins\platforms\qwindows.dll
"C:\Program Files\7-Zip\7z.exe" rn GloSC_x64.zip qwindows.dll platforms\qwindows.dll

@ -2,31 +2,23 @@
**Build requirements:**
- M$ Visual Studio (2017)
- [Qt 5.9](http://info.qt.io/download-qt-for-application-development) (x86/x64)
- [Qt 5.10.1](http://info.qt.io/download-qt-for-application-development) (x86)
- [Qt Visual Studio Tools](https://marketplace.visualstudio.com/items?itemName=TheQtCompany.QtVisualStudioTools)
- [ViGEm](https://github.com/nefarius/ViGEm)
ViGEms user mode library as well as [SFML](http://sfml-dev.org) are bundled in the repo.
For ViGEms installation refer to the Readme-files from the relevant sub-projects, or use the binary installer (if available).
For ViGEms installation refer to the Readme-files from the relevant sub-projects, or use provided install script (in redist)
--
Set the correct Qt version for "*GloSC*", "*GloSC_GameLauncher*" and "*SteamTarget*" depending on your build.
Set the correct Qt version for "*GloSC*", and "*SteamTarget*" depending on your build.
Rebuild the solution and you should be good to go.
# Installation
Copy all **files** out of the relevant build directories, as well as, "*TargetConfig.ini*" and the relevant SFML, ViGEmUM and QT .dll-files in a separate directory.
To launch games without doubled overlays, GloSC_GameLauncher has to run at boot.
If you didn't use the installer, just place the reg-entry for the autostart
Be careful that the right executable is running, as there can only ever be one Instance of "GloSC_GameLauncher" running.
Copy all **files** out of the relevant build directories, as well as, "*TargetConfig.ini*" and the relevant SFML and QT .dll-files in a separate directory.
Afterwards create your shortcuts with GloSC and you are ready to go.
### Notes:
The GloSC_GameLauncher must be running from that directory, as Admin, to make double sure Steam does get unhooked after closing a shortcut

@ -71,14 +71,14 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\Win32Only\$(Configuration)</OutDir>
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\Win32Only\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
@ -150,6 +150,7 @@
<ClCompile Include="EnforceBindings.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\common_hookfuns.h" />
<ClInclude Include="EnforceBindings.h" />
<ClInclude Include="resource.h" />
</ItemGroup>

@ -29,6 +29,9 @@
<ClInclude Include="resource.h">
<Filter>Headerdateien</Filter>
</ClInclude>
<ClInclude Include="..\common\common_hookfuns.h">
<Filter>Headerdateien</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="EnforceBindingDLL.rc">

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -15,6 +15,7 @@ limitations under the License.
*/
#include "EnforceBindings.h"
#include <vector>
#include "../common/common_hookfuns.h"
//stuff for finding the function as well as the injected code
//should probably be moved somewhere else
@ -80,7 +81,7 @@ void EnforceBindings::patchBytes()
if (address != NULL)
{
JMPBack = address + fun_prolog.length();
PlaceJMP((BYTE*)address, (DWORD)generalized_hookFn, fun_prolog.length());
hook_commons::PlaceJMP((BYTE*)address, (DWORD)generalized_hookFn, fun_prolog.length());
}
}
@ -88,76 +89,10 @@ void EnforceBindings::Unpatch()
{
if (address != NULL)
{
RestoreBytes((BYTE*)address, (BYTE*)fun_prolog.c_str(), fun_prolog.length());
hook_commons::RestoreBytes((BYTE*)address, (BYTE*)fun_prolog.c_str(), fun_prolog.length());
}
}
//places a jmp instruction to a __declspec(naked) function on a given adress
//nops the rest of bytes to don't break any instructions
//part of patched code may has to be executed in the hook function
void EnforceBindings::PlaceJMP(BYTE * Address, DWORD jumpTo, DWORD lenght)
{
DWORD dwOldProtect, dwBkup, dwReloadAddr;
VirtualProtect(Address, lenght, PAGE_EXECUTE_READWRITE, &dwOldProtect);
dwReloadAddr = (jumpTo - (DWORD)Address) - 5; //5 == lenght of jump instruction (1byte + 4byte address)
*Address = 0xE9; //jmp instrcution
*((DWORD*)(Address + 0x1)) = dwReloadAddr;
for (DWORD x = 5; x < lenght; x++)
*(Address + x) = 0x90; //nop the rest
VirtualProtect(Address, lenght, dwOldProtect, &dwBkup);
}
void EnforceBindings::RestoreBytes(BYTE * Address, BYTE * original, DWORD lenght)
{
DWORD dwOldProtect, dwBkup, dwReloadAddr;
VirtualProtect(Address, lenght, PAGE_EXECUTE_READWRITE, &dwOldProtect);
for (DWORD x = 0; x < lenght; x++)
{
*(Address + x) = *(original + x);
}
VirtualProtect(Address, lenght, dwOldProtect, &dwBkup);
}
MODULEINFO EnforceBindings::GetModInfo(char * szModule)
{
MODULEINFO ret = { NULL };
HMODULE mod = GetModuleHandleA(szModule);
if (mod != 0)
GetModuleInformation(GetCurrentProcess(), mod, &ret, sizeof(MODULEINFO));
return ret;
}
//returns memory address of given pattern ind given module
DWORD EnforceBindings::FindPattern(char * module, const char * pattern, const char * mask)
{
MODULEINFO mInfo = GetModInfo(module);
DWORD baseAddr = (DWORD)mInfo.lpBaseOfDll;
DWORD size = mInfo.SizeOfImage;
DWORD patLenght = strlen(mask);
for (DWORD i = 0; i < size - patLenght; i++) //bad for loop btw...
{
bool found = true;
for (DWORD j = 0; j < patLenght; j++)
found &= mask[j] == '?' || pattern[j] == *(char*)(baseAddr + j + i);
if (found)
return baseAddr + i;
}
return NULL;
}
/*
* Search for address of functrion we want to hook
*
@ -171,7 +106,7 @@ DWORD EnforceBindings::FindPattern(char * module, const char * pattern, const ch
*/
DWORD EnforceBindings::FindHookFunctionAdress()
{
MODULEINFO mInfo = GetModInfo("steamclient.dll");
MODULEINFO mInfo = hook_commons::GetModInfo("steamclient.dll");
DWORD baseAddr = (DWORD)mInfo.lpBaseOfDll;
DWORD size = mInfo.SizeOfImage;

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -31,10 +31,6 @@ public:
private:
static void PlaceJMP(BYTE * Address, DWORD jumpTo, DWORD lenght);
static void RestoreBytes(BYTE *Address, BYTE *original, DWORD lenght);
static MODULEINFO GetModInfo(char *szModule);
static DWORD FindPattern(char *module, const char *pattern, const char *mask);
static DWORD FindHookFunctionAdress();
static DWORD FindHookFunctionAdress();
};

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

@ -1,17 +1,15 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26430.12
VisualStudioVersion = 15.0.27130.2036
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "SteamTarget", "SteamTarget\SteamTarget.vcxproj", "{B12702AD-ABFB-343A-A199-8E24837244A3}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GloSC", "GloSC\GloSC.vcxproj", "{2E7F8131-0BD8-475D-B16F-20445CCF2D16}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GloSC_GameLauncher", "GloSC_GameLauncher\GloSC_GameLauncher.vcxproj", "{431D29FD-73F8-4374-868B-F72972566F41}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EnforceBindingDLL", "EnforceBindingDLL\EnforceBindingDLL.vcxproj", "{AFA0047E-7DEE-472A-AF4B-436A30459905}"
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Injector", "Injector\Injector.vcxproj", "{0F6DB076-7345-487C-BA8C-E659EBB05962}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "GloSC_Watchdog", "GloSC_Watchdog\GloSC_Watchdog.vcxproj", "{752D3933-73A3-45E4-B139-CCB8C04BE543}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -37,35 +35,28 @@ Global
{2E7F8131-0BD8-475D-B16F-20445CCF2D16}.Release|x64.Build.0 = Release|x64
{2E7F8131-0BD8-475D-B16F-20445CCF2D16}.Release|x86.ActiveCfg = Release|Win32
{2E7F8131-0BD8-475D-B16F-20445CCF2D16}.Release|x86.Build.0 = Release|Win32
{431D29FD-73F8-4374-868B-F72972566F41}.Debug|x64.ActiveCfg = Debug|x64
{431D29FD-73F8-4374-868B-F72972566F41}.Debug|x64.Build.0 = Debug|x64
{431D29FD-73F8-4374-868B-F72972566F41}.Debug|x86.ActiveCfg = Debug|Win32
{431D29FD-73F8-4374-868B-F72972566F41}.Debug|x86.Build.0 = Debug|Win32
{431D29FD-73F8-4374-868B-F72972566F41}.Release|x64.ActiveCfg = Release|x64
{431D29FD-73F8-4374-868B-F72972566F41}.Release|x64.Build.0 = Release|x64
{431D29FD-73F8-4374-868B-F72972566F41}.Release|x86.ActiveCfg = Release|Win32
{431D29FD-73F8-4374-868B-F72972566F41}.Release|x86.Build.0 = Release|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x64.ActiveCfg = Debug|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x64.Build.0 = Debug|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x64.ActiveCfg = Debug|x64
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x64.Build.0 = Debug|x64
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x86.ActiveCfg = Debug|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Debug|x86.Build.0 = Debug|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Release|x64.ActiveCfg = Release|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Release|x64.Build.0 = Release|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Release|x86.ActiveCfg = Release|Win32
{AFA0047E-7DEE-472A-AF4B-436A30459905}.Release|x86.Build.0 = Release|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Debug|x64.ActiveCfg = Debug|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Debug|x64.Build.0 = Debug|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Debug|x86.ActiveCfg = Debug|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Debug|x86.Build.0 = Debug|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Release|x64.ActiveCfg = Release|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Release|x64.Build.0 = Release|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Release|x86.ActiveCfg = Release|Win32
{0F6DB076-7345-487C-BA8C-E659EBB05962}.Release|x86.Build.0 = Release|Win32
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Debug|x64.ActiveCfg = Debug|x64
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Debug|x64.Build.0 = Debug|x64
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Debug|x86.ActiveCfg = Debug|Win32
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Debug|x86.Build.0 = Debug|Win32
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Release|x64.ActiveCfg = Release|x64
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Release|x64.Build.0 = Release|x64
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Release|x86.ActiveCfg = Release|Win32
{752D3933-73A3-45E4-B139-CCB8C04BE543}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {F7ACD6EA-A3F9-4E3C-8A47-AC10F52B14B9}
Qt5Version = 5.10.1_x64
EndGlobalSection
EndGlobal

Binary file not shown.

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -15,30 +15,28 @@ limitations under the License.
*/
#include "GloSC.h"
#include <memory>
#include "UpdateChecker.h"
GloSC::GloSC(QWidget *parent)
: QMainWindow(parent)
: QMainWindow(parent), updater_(this)
{
QDir::setCurrent(QCoreApplication::applicationDirPath());
ui.setupUi(this);
ui_.setupUi(this);
this->setMaximumWidth(small_x);
this->setMaximumWidth(small_x_);
updateEntryList();
updateTargetsToNewVersion();
//Launch the gamelauncher here, just to be safe
//Don't need to check if the process already exists as it does it itself
QProcess proc;
proc.startDetached("GloSC_Gamelauncher.exe", QStringList(), QApplication::applicationDirPath(), nullptr);
if (first_launch_)
showTutorial();
updater_.checkUpdate(GLOSC_VERSION);
}
void GloSC::updateEntryList()
{
ui.lwInstances->clear();
ui_.lwInstances->clear();
QDir dir("./targets");
QStringList fileNames = dir.entryList(QDir::Files);
@ -50,7 +48,7 @@ void GloSC::updateEntryList()
for (auto &fileName : fileNames)
{
if (fileName.endsWith(".ini"))
ui.lwInstances->addItem(fileName.left(fileName.length() - 4));
ui_.lwInstances->addItem(fileName.left(fileName.length() - 4));
}
@ -62,9 +60,9 @@ void GloSC::writeIni(QString entryName) const
settings.beginGroup("BaseConf");
settings.setValue("bEnableOverlay", 0 + ui.cbOverlay->isChecked());
settings.setValue("bEnableControllers", 0 + ui.cbControllers->isChecked());
settings.setValue("bUseDesktopConfig", 0 + ui.cbUseDesktop->isChecked());
settings.setValue("bEnableOverlay", 0 + ui_.cbOverlay->isChecked());
settings.setValue("bEnableControllers", 0 + ui_.cbControllers->isChecked());
settings.setValue("bUseDesktopConfig", 0 + ui_.cbUseDesktop->isChecked());
settings.setValue("bHookSteam", hook_steam_);
settings.setValue("version", GLOSC_VERSION);
@ -73,15 +71,15 @@ void GloSC::writeIni(QString entryName) const
settings.beginGroup("LaunchGame");
settings.setValue("bLaunchGame", 0 + ui.cbLaunchGame->isChecked());
settings.setValue("Path", ui.lePath->text());
settings.setValue("Args", ui.leArguments->text());
if (ui.lePath->text().contains("\\") || ui.lePath->text().contains("/"))
settings.setValue("bLaunchGame", 0 + ui_.cbLaunchGame->isChecked());
settings.setValue("Path", ui_.lePath->text());
settings.setValue("Args", ui_.leArguments->text());
if (ui_.lePath->text().contains("\\") || ui_.lePath->text().contains("/"))
settings.setValue("Type", "Win32");
else
settings.setValue("Type", "UWP");
settings.setValue("bCloseWhenDone", 0 + ui.cbCloseWhenDone->isChecked());
settings.setValue("bCloseWhenDone", 0 + ui_.cbCloseWhenDone->isChecked());
settings.endGroup();
@ -90,14 +88,14 @@ void GloSC::writeIni(QString entryName) const
void GloSC::updateTargetsToNewVersion()
{
//incredible lazy way to update to this next version but eh...
for (int i = 0; i < ui.lwInstances->count(); i++)
for (int i = 0; i < ui_.lwInstances->count(); i++)
{
on_lwInstances_currentRowChanged(i);
QString name = ui.leName->text();
const QString name = ui_.leName->text();
QSettings settings("./targets/" + name + ".ini", QSettings::IniFormat);
settings.beginGroup("BaseConf");
unsigned int version = settings.value("version").toInt();
const unsigned int version = settings.value("version").toInt();
settings.endGroup();
if (version < GLOSC_VERSION)
@ -107,9 +105,9 @@ void GloSC::updateTargetsToNewVersion()
void GloSC::check360ControllerRebinding()
{
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Valve\\Steam", QSettings::NativeFormat);
QString steamPath = settings.value("SteamPath").toString();
QString activeUser = settings.value("ActiveProcess/ActiveUser").toString();
QSettings settings(R"(HKEY_CURRENT_USER\SOFTWARE\Valve\Steam)", QSettings::NativeFormat);
const QString steamPath = settings.value("SteamPath").toString();
const QString activeUser = settings.value("ActiveProcess/ActiveUser").toString();
QFile configFile(steamPath + "/userdata/" + activeUser + "/config/localconfig.vdf");
@ -185,11 +183,11 @@ void GloSC::animate(int to)
});
this->setMaximumWidth(to);
QPropertyAnimation* buttonAnim = new QPropertyAnimation(ui.pbCreateNew, "size");
QPropertyAnimation* buttonAnim = new QPropertyAnimation(ui_.pbCreateNew, "size");
buttonAnim->setEasingCurve(QEasingCurve::InOutExpo);
buttonAnim->setDuration(360);
buttonAnim->setStartValue(QSize(ui.pbCreateNew->width(), ui.pbCreateNew->height()));
buttonAnim->setEndValue(QSize(wide_x_create, ui.pbCreateNew->height()));
buttonAnim->setStartValue(QSize(ui_.pbCreateNew->width(), ui_.pbCreateNew->height()));
buttonAnim->setEndValue(QSize(wide_x_create_, ui_.pbCreateNew->height()));
buttonAnim->start(QPropertyAnimation::DeleteWhenStopped);
}
@ -202,11 +200,11 @@ void GloSC::animate(int to)
});
this->setMinimumWidth(to);
QPropertyAnimation* buttonAnim = new QPropertyAnimation(ui.pbCreateNew, "size");
QPropertyAnimation* buttonAnim = new QPropertyAnimation(ui_.pbCreateNew, "size");
buttonAnim->setEasingCurve(QEasingCurve::InExpo);
buttonAnim->setDuration(360);
buttonAnim->setStartValue(QSize(ui.pbCreateNew->width(), ui.pbCreateNew->height()));
buttonAnim->setEndValue(QSize(small_x_create, ui.pbCreateNew->height()));
buttonAnim->setStartValue(QSize(ui_.pbCreateNew->width(), ui_.pbCreateNew->height()));
buttonAnim->setEndValue(QSize(small_x_create_, ui_.pbCreateNew->height()));
buttonAnim->start(QPropertyAnimation::DeleteWhenStopped);
}
@ -225,85 +223,85 @@ void GloSC::showTutorial()
{
ui.pbTuorialCreate->setVisible(false);
ui.pbTuorialCreate->setEnabled(false);
ui.tutorialFrame->setGeometry(ui.tutorialFrame->x(), ui.tutorialFrame->y(), ui.tutorialFrame->width(), 386);
ui_.pbTuorialCreate->setVisible(false);
ui_.pbTuorialCreate->setEnabled(false);
ui_.tutorialFrame->setGeometry(ui_.tutorialFrame->x(), ui_.tutorialFrame->y(), ui_.tutorialFrame->width(), 386);
for (int i = 1; i < 14; i++)
{
QLabel* label = ui.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(i)));
QLabel* label = ui_.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(i)));
if (label != nullptr)
label->setVisible(false);
}
connect(ui.pbTutorialNext, &QPushButton::clicked, [this]() {
connect(ui_.pbTutorialNext, &QPushButton::clicked, [this]() {
current_slide_++;
if (current_slide_ >= 14)
{
ui.tutorialFrame->setGeometry(ui.tutorialFrame->x(), ui.tutorialFrame->y(), ui.tutorialFrame->width(), 0);
ui.pbTutorialNext->setVisible(false);
ui.pbTutorialNext->setEnabled(false);
ui_.tutorialFrame->setGeometry(ui_.tutorialFrame->x(), ui_.tutorialFrame->y(), ui_.tutorialFrame->width(), 0);
ui_.pbTutorialNext->setVisible(false);
ui_.pbTutorialNext->setEnabled(false);
return;
}
ui.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(current_slide_ - 1)))->setVisible(false);
ui.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(current_slide_)))->setVisible(true);
ui_.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(current_slide_ - 1)))->setVisible(false);
ui_.tutorialFrame->findChild<QLabel *>(QString("lTutorialText" + QString::number(current_slide_)))->setVisible(true);
QString test = QString(":/Tutorial/tut-assets/Tut" + QString::number(current_slide_) + ".png");
ui.lTutorialBackground->setPixmap(QPixmap(test));
ui_.lTutorialBackground->setPixmap(QPixmap(test));
if (current_slide_ == 1)
{
ui.pbTutorialNext->setVisible(false);
ui.pbTutorialNext->setEnabled(false);
ui.pbTuorialCreate->setVisible(true);
ui.pbTuorialCreate->setEnabled(true);
ui_.pbTutorialNext->setVisible(false);
ui_.pbTutorialNext->setEnabled(false);
ui_.pbTuorialCreate->setVisible(true);
ui_.pbTuorialCreate->setEnabled(true);
}
if (current_slide_ == 2)
ui.pbTutorialNext->setGeometry(600, ui.pbTutorialNext->y(), ui.pbTutorialNext->width(), ui.pbTutorialNext->height());
ui_.pbTutorialNext->setGeometry(600, ui_.pbTutorialNext->y(), ui_.pbTutorialNext->width(), ui_.pbTutorialNext->height());
if (current_slide_ == 13)
{
animate(small_x);
ui.pbTutorialNext->setText("Finish");
ui.pbTutorialNext->setGeometry(180, 45, ui.pbTutorialNext->width(), ui.pbTutorialNext->height());
animate(small_x_);
ui_.pbTutorialNext->setText("Finish");
ui_.pbTutorialNext->setGeometry(180, 45, ui_.pbTutorialNext->width(), ui_.pbTutorialNext->height());
}
});
connect(ui.pbTuorialCreate, &QPushButton::clicked, [this]()
connect(ui_.pbTuorialCreate, &QPushButton::clicked, [this]()
{
ui.pbTuorialCreate->setVisible(false);
ui.pbTuorialCreate->setEnabled(false);
ui.pbTutorialNext->setVisible(true);
ui.pbTutorialNext->setEnabled(true);
ui_.pbTuorialCreate->setVisible(false);
ui_.pbTuorialCreate->setEnabled(false);
ui_.pbTutorialNext->setVisible(true);
ui_.pbTutorialNext->setEnabled(true);
on_pbCreateNew_clicked();
ui.pbTutorialNext->click();
ui_.pbTutorialNext->click();
});
}
void GloSC::on_pbCreateNew_clicked()
{
ui.leName->setText("");
ui_.leName->setText("");
ui.cbOverlay->setChecked(true);
ui.cbControllers->setChecked(true);
ui_.cbOverlay->setChecked(true);
ui_.cbControllers->setChecked(true);
hook_steam_ = true;
ui.cbLaunchGame->setChecked(false);
ui.lePath->setText("");
ui.leArguments->setText("");
ui.cbCloseWhenDone->setChecked(false);
ui_.cbLaunchGame->setChecked(false);
ui_.lePath->setText("");
ui_.leArguments->setText("");
ui_.cbCloseWhenDone->setChecked(false);
animate(wide_x);
animate(wide_x_);
}
void GloSC::on_pbSave_clicked()
{
QString name = ui.leName->text();
QString name = ui_.leName->text();
name.remove("\\");
name.remove("/");
name.remove(":");
@ -321,13 +319,13 @@ void GloSC::on_pbSave_clicked()
updateEntryList();
animate(small_x);
animate(small_x_);
}
void GloSC::on_pbDelete_clicked()
{
QString name = ui.leName->text();
QString name = ui_.leName->text();
QString temp = name;
if (temp.remove(" ") == "")
@ -340,20 +338,20 @@ void GloSC::on_pbDelete_clicked()
}
updateEntryList();
animate(small_x);
animate(small_x_);
}
void GloSC::on_pbAddToSteam_clicked()
{
if (ui.lwInstances->count() <= 0)
if (ui_.lwInstances->count() <= 0)
{
QMessageBox::information(this, "GloSC", "No shortcuts! Create some shortcuts first for them to be added to Steam!", QMessageBox::Ok);
return;
}
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Valve\\Steam", QSettings::NativeFormat);
QString steamPath = settings.value("SteamPath").toString();
QString activeUser = settings.value("ActiveProcess/ActiveUser").toString();
QSettings settings(R"(HKEY_CURRENT_USER\SOFTWARE\Valve\Steam)", QSettings::NativeFormat);
const QString steamPath = settings.value("SteamPath").toString();
const QString activeUser = settings.value("ActiveProcess/ActiveUser").toString();
QFile shortcutsFile(steamPath + "/userdata/" + activeUser + "/config/shortcuts.vdf");
@ -381,11 +379,10 @@ void GloSC::on_pbAddToSteam_clicked()
temp = temp.mid(temp.lastIndexOf("tags") + 8, temp.size() - 1);
int shortcutCount = QString(temp).toInt();
QString itemName;
QDir appDir = QDir::current();
for (int i = 0; i < ui.lwInstances->count(); i++)
for (int i = 0; i < ui_.lwInstances->count(); i++)
{
itemName = ui.lwInstances->item(i)->text();
const QString itemName = ui_.lwInstances->item(i)->text();
if (!shortcutsFileBytes.contains(("\"" + QDir::toNativeSeparators(appDir.absoluteFilePath("SteamTarget.exe")) + "\"" + " \"./targets/" + itemName + ".ini\"").toStdString().c_str()))
{
shortcutsFileBytes.chop(2); //chop of end bytes
@ -461,7 +458,7 @@ void GloSC::on_pbAddToSteam_clicked()
shortcutsFile.close();
animate(small_x);
animate(small_x_);
if( QMessageBox::information(this, "GloSC",
"Shortcuts were added!\nRestart Steam for changes to take effect!\nRestart Steam now?",
@ -470,7 +467,7 @@ void GloSC::on_pbAddToSteam_clicked()
== QMessageBox::Yes)
{
QSettings settings("HKEY_CURRENT_USER\\SOFTWARE\\Valve\\Steam", QSettings::NativeFormat);
QSettings settings(R"(HKEY_CURRENT_USER\SOFTWARE\Valve\Steam)", QSettings::NativeFormat);
QString steamPath = settings.value("SteamPath").toString() + "/Steam.exe";
steamPath = QDir::toNativeSeparators(steamPath);
@ -496,17 +493,17 @@ void GloSC::on_pbSearchPath_clicked()
if (!filePath.isEmpty())
{
QFileInfo fileInfo(filePath);
ui.lePath->setText(fileInfo.filePath());
ui_.lePath->setText(fileInfo.filePath());
QString name = fileInfo.fileName();
name.chop(4);
ui.leName->setText(name);
ui.cbLaunchGame->setChecked(true);
ui_.leName->setText(name);
ui_.cbLaunchGame->setChecked(true);
}
}
void GloSC::on_pbUWP_clicked()
{
auto settings = std::make_unique<QSettings>("HKEY_CLASSES_ROOT\\Extensions\\ContractId\\Windows.Launch\\PackageId", QSettings::NativeFormat);
auto settings = std::make_unique<QSettings>(R"(HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Launch\PackageId)", QSettings::NativeFormat);
QStringList childs = settings->childGroups();
QStringList packages;
@ -537,7 +534,7 @@ void GloSC::on_pbUWP_clicked()
{
return;
}
settings = std::make_unique<QSettings>("HKEY_CLASSES_ROOT\\Extensions\\ContractId\\Windows.Launch\\PackageId\\" + package, QSettings::NativeFormat);
settings = std::make_unique<QSettings>(R"(HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Launch\PackageId\)" + package, QSettings::NativeFormat);
@ -545,8 +542,8 @@ void GloSC::on_pbUWP_clicked()
{
if (child == "ActivatableClassId")
{
auto classIDSettings = std::make_unique<QSettings>(
"HKEY_CLASSES_ROOT\\Extensions\\ContractId\\Windows.Launch\\PackageId\\" + package + "\\" + child,
const auto classIDSettings = std::make_unique<QSettings>(
R"(HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Launch\PackageId\)" + package + "\\" + child,
QSettings::NativeFormat);
if (classIDSettings->childGroups().length() > 0)
@ -564,8 +561,8 @@ void GloSC::on_pbUWP_clicked()
QString AppUMId = pkgNameCleaned + "!" + classIDSettings->childGroups().at(0);
auto appInfoSettings = std::make_unique<QSettings>(
"HKEY_CLASSES_ROOT\\Extensions\\ContractId\\Windows.Launch\\PackageId\\"
const auto appInfoSettings = std::make_unique<QSettings>(
R"(HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Launch\PackageId\)"
+ package + "\\" + child + "\\" + classIDSettings->childGroups().at(0),
QSettings::NativeFormat);
@ -586,17 +583,16 @@ void GloSC::on_pbUWP_clicked()
else if (AppName.at(0) == '@') {
QString packageName = AppName.mid(AppName.indexOf('{') + 1, AppName.size() - 1);
packageName = packageName.mid(0, packageName.indexOf('?'));
QStringList cachedNameChildGroups;
QSettings settings("HKEY_CLASSES_ROOT\\Local Settings\\MrtCache", QSettings::NativeFormat);
cachedNameChildGroups = settings.childGroups();
QStringList cachedNameChildGroups = settings.childGroups();
for (auto &childGroup : cachedNameChildGroups)
{
if (childGroup.contains(packageName))
{
QSettings settings("HKEY_CLASSES_ROOT\\Local Settings\\MrtCache\\" + childGroup, QSettings::NativeFormat);
QSettings settings(R"(HKEY_CLASSES_ROOT\Local Settings\MrtCache\)" + childGroup, QSettings::NativeFormat);
QStringList allKeys = settings.allKeys();
@ -618,7 +614,7 @@ void GloSC::on_pbUWP_clicked()
}
}
UWPPair uwpPair = {
const UWPPair uwpPair = {
AppName,
AppUMId,
};
@ -636,19 +632,19 @@ void GloSC::on_pbUWP_clicked()
}
uwpPairs = pairs;
uwp_pairs_ = pairs;
progDialog.close();
UWPSelectDialog dialog(this);
dialog.setUWPList(uwpPairs);
dialog.setUWPList(uwp_pairs_);
int selection = dialog.exec();
if (selection > -1)
{
ui.lePath->setText(uwpPairs.at(selection).AppUMId);
ui.leName->setText(uwpPairs.at(selection).AppName);
ui.cbLaunchGame->setChecked(true);
ui_.lePath->setText(uwp_pairs_.at(selection).AppUMId);
ui_.leName->setText(uwp_pairs_.at(selection).AppName);
ui_.cbLaunchGame->setChecked(true);
}
}
@ -657,17 +653,17 @@ void GloSC::on_lwInstances_currentRowChanged(int row)
{
if (row < 0)
return;
QString entryName = ui.lwInstances->item(row)->text();
ui.leName->setText(entryName);
const QString entryName = ui_.lwInstances->item(row)->text();
ui_.leName->setText(entryName);
QSettings settings("./targets/" + entryName + ".ini", QSettings::IniFormat);
settings.beginGroup("BaseConf");
ui.cbOverlay->setChecked(settings.value("bEnableOverlay").toBool());
ui.cbControllers->setChecked(settings.value("bEnableControllers").toBool());
ui.cbUseDesktop->setChecked(settings.value("bUseDesktopConfig").toBool());
if (ui.cbUseDesktop->isChecked())
ui_.cbOverlay->setChecked(settings.value("bEnableOverlay").toBool());
ui_.cbControllers->setChecked(settings.value("bEnableControllers").toBool());
ui_.cbUseDesktop->setChecked(settings.value("bUseDesktopConfig").toBool());
if (ui_.cbUseDesktop->isChecked())
{
hook_steam_ = false;
}
@ -681,10 +677,10 @@ void GloSC::on_lwInstances_currentRowChanged(int row)
settings.beginGroup("LaunchGame");
ui.cbLaunchGame->setChecked(settings.value("bLaunchGame").toBool());
ui.lePath->setText(settings.value("Path").toString());
ui.leArguments->setText(settings.value("Args").toString());
ui.cbCloseWhenDone->setChecked(settings.value("bCloseWhenDone").toBool());
ui_.cbLaunchGame->setChecked(settings.value("bLaunchGame").toBool());
ui_.lePath->setText(settings.value("Path").toString());
ui_.leArguments->setText(settings.value("Args").toString());
ui_.cbCloseWhenDone->setChecked(settings.value("bCloseWhenDone").toBool());
settings.endGroup();
@ -692,8 +688,8 @@ void GloSC::on_lwInstances_currentRowChanged(int row)
void GloSC::on_lwInstances_itemSelectionChanged()
{
if (width() != wide_x)
if (width() != wide_x_)
{
animate(wide_x);
animate(wide_x_);
}
}

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -37,16 +37,18 @@ limitations under the License.
#include "UWPPair.h"
#include "UWPSelectDialog.h"
#include "UpdateChecker.h"
class GloSC : public QMainWindow
{
Q_OBJECT
public:
GloSC(QWidget *parent = Q_NULLPTR);
explicit GloSC(QWidget *parent = Q_NULLPTR);
private:
Ui::GloSCClass ui;
Ui::GloSCClass ui_;
void updateEntryList();
void writeIni(QString entryName) const;
@ -55,17 +57,17 @@ private:
void check360ControllerRebinding();
QList<UWPPair> uwpPairs;
QList<UWPPair> uwp_pairs_;
const unsigned int GLOSC_VERSION = 0x00000140; //Version Number in as bytes, just remove the dots.
constexpr static const unsigned int GLOSC_VERSION = 0x00000512; //Version Number in as bytes, just remove the dots.
int wide_x = 711;
int small_x = 302;
int wide_x_ = 711;
int small_x_ = 302;
int wide_x_create = 261;
int small_x_create = 131;
int wide_x_create_ = 261;
int small_x_create_ = 131;
QGraphicsOpacityEffect opEff;
QGraphicsOpacityEffect op_eff_;
void animate(int to);
@ -78,6 +80,8 @@ private:
int current_slide_ = 0;
int last_slide_ = 13;
UpdateChecker updater_;
private slots:
void on_cbUseDesktop_toggled(bool checked);
void on_pbCreateNew_clicked();

Binary file not shown.

@ -59,8 +59,8 @@
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -71,14 +71,14 @@
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
@ -89,14 +89,14 @@
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;Qt5Networkd.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat />
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
@ -106,14 +106,14 @@
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;QT_NETWORK_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;$(QTDIR)\include\QtNetwork;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>
</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
@ -124,7 +124,7 @@
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;Qt5Network.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
@ -133,6 +133,10 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_UpdateChecker.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_UWPSelectDialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
@ -151,12 +155,17 @@
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_UpdateChecker.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_UWPSelectDialog.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GloSC.cpp" />
<ClCompile Include="main.cpp" />
<ClCompile Include="UpdateChecker.cpp" />
<ClCompile Include="UWPSelectDialog.cpp" />
</ItemGroup>
<ItemGroup>
@ -167,16 +176,16 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GloSC.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GloSC.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GloSC.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@ -203,6 +212,24 @@
<ClInclude Include="GeneratedFiles\ui_GloSC.h" />
<ClInclude Include="GeneratedFiles\ui_UWPSelectDialog.h" />
<ClInclude Include="resource.h" />
<CustomBuild Include="UpdateChecker.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
</CustomBuild>
<ClInclude Include="UWPPair.h" />
<CustomBuild Include="UWPSelectDialog.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
@ -211,16 +238,16 @@
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing UWPSelectDialog.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing UWPSelectDialog.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing UWPSelectDialog.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB -DQT_NETWORK_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets" "-I$(QTDIR)\include\QtNetwork"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
@ -274,7 +301,7 @@
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="5.7_x86" Qt5Version_x0020_x64="5.10.1_x64" MocOptions="" />
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="msvc2015" Qt5Version_x0020_x64="5.10.1_x64" MocOptions="" />
</VisualStudio>
</ProjectExtensions>
</Project>

@ -64,6 +64,15 @@
<ClCompile Include="UWPSelectDialog.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="UpdateChecker.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_UpdateChecker.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_UpdateChecker.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="GloSC.h">
@ -81,6 +90,9 @@
<CustomBuild Include="UWPSelectDialog.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="UpdateChecker.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_GloSC.h">

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

@ -0,0 +1,69 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "UpdateChecker.h"
#include <QJsonObject>
#include <QJsonArray>
#include <QJsonDocument>
#include <QString>
#include <QDesktopServices>
#include <qmessagebox.h>
UpdateChecker::UpdateChecker(QObject* parent) : QObject(parent)
{
}
void UpdateChecker::checkUpdate(int version)
{
version_ = version;
connect(&net_manager_, SIGNAL(finished(QNetworkReply*)), this, SLOT(netRequestFinished(QNetworkReply*)));
net_manager_.get(QNetworkRequest(QUrl(releases_url)));
}
void UpdateChecker::netRequestFinished(QNetworkReply* reply) const
{
if (!reply->error())
{
auto json = QJsonDocument::fromJson(reply->readAll());
if (!json.isNull() && json.isArray())
{
auto last_release_object = json.array()[0].toObject();
auto tag = last_release_object.take("tag_name").toString();
auto tag_substrings = tag.split('.');
if (tag_substrings.length() >= 3)
{
int version = 0;
version = (version << 4) + static_cast<char>(std::atoi(tag_substrings[0].toStdString().data()));
version = (version << 4) + static_cast<char>(std::atoi(tag_substrings[1].toStdString().data()));
version = (version << 4) + static_cast<char>(std::atoi(tag_substrings[2].toStdString().data()));
if (version > version_)
{
if (QMessageBox::information(nullptr,
"GloSC", "There is a new version available!\nDownload now?",
QMessageBox::Yes | QMessageBox::No)
== QMessageBox::Yes)
{
QDesktopServices::openUrl(QUrl(last_release_object.take("html_url").toString()));
}
}
}
}
}
}

@ -0,0 +1,43 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <QtNetwork/QNetworkAccessManager>
#include <QtNetwork/QNetworkRequest>
#include <QtNetwork/QNetworkReply>
#include <QUrl>
#include <QDateTime>
#include <QFile>
class UpdateChecker : public QObject
{
Q_OBJECT
public:
explicit UpdateChecker(QObject *parent = nullptr);
void checkUpdate(int version);
public slots:
void netRequestFinished(QNetworkReply* reply) const;
private:
QNetworkAccessManager net_manager_;
int version_ = 0;
constexpr static const char* releases_url = "https://api.github.com/repos/Alia5/GloSC/releases";
};

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.

@ -1,212 +0,0 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http ://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "GloSC_GameLauncher.h"
#include <qapplication.h>
GloSC_GameLauncher::GloSC_GameLauncher(QWidget *parent)
: QMainWindow(parent)
{
ui.setupUi(this);
QTimer::singleShot(0, this, SLOT(hide()));
sharedMemInstance.setKey("GloSC_GameLauncher");
sharedMemInstance.create(1024);
if (!sharedMemInstance.create(1024) && sharedMemInstance.error() == QSharedMemory::AlreadyExists)
{
exit(1);
}
sharedMemInstance.attach();
sharedMemInstance.lock();
memset(sharedMemInstance.data(), NULL, 1024);
QBuffer buffer;
buffer.open(QBuffer::ReadWrite);
QDataStream out(&buffer);
out << defaultSharedMemData;
int size = buffer.size();
char *to = static_cast<char*>(sharedMemInstance.data());
const char *from = buffer.data().data();
memcpy(to, from, qMin(sharedMemInstance.size(), size));
sharedMemInstance.unlock();
connect(qApp, SIGNAL(aboutToQuit()), this, SLOT(isAboutToBeKilled()));
connect(&updateTimer, SIGNAL(timeout()), this, SLOT(checkSharedMem()));
updateTimer.setInterval(333);
updateTimer.start();
}
void GloSC_GameLauncher::isAboutToBeKilled()
{
sharedMemInstance.detach();
}
void GloSC_GameLauncher::checkSharedMem()
{
QBuffer buffer;
QDataStream dataStream(&buffer);
QStringList stringList;
sharedMemInstance.lock();
buffer.setData(static_cast<const char*>(sharedMemInstance.constData()), sharedMemInstance.size());
buffer.open(QBuffer::ReadOnly);
dataStream >> stringList;
buffer.close();
int i = stringList.indexOf(LaunchGame);
if (i > -1)
{
if (stringList.at(i + 1) != "" && stringList.at(i + 2) != "")
{
QStringList args;
QRegularExpression re("([^\\s\"']+)|\"([^\"]*)\"|'([^']*)'");
QRegularExpressionMatchIterator ri = re.globalMatch(stringList.at(i + 3));
while (ri.hasNext())
{
QRegularExpressionMatch match = ri.next();
int mi = 1;
while (match.captured(mi).isEmpty())
mi++;
args += match.captured(mi);
}
launchGame(stringList.at(i + 1), stringList.at(i + 2), args);
stringList = defaultSharedMemData;
}
}
i = stringList.indexOf(IsSteamHooked);
if (i > -1)
{
if (stringList.at(i + 1).toInt() > -1)
{
bHookedSteam = true;
stringList.replace(i + 1, "-1");
}
}
if (pid != NULL)
{
if (!IsProcessRunning(pid))
{
pid = NULL;
int i = stringList.indexOf(LaunchedProcessFinished) + 1;
stringList.replace(i, "1");
}
}
buffer.open(QBuffer::ReadWrite);
QDataStream out(&buffer);
out << stringList;
int size = buffer.size();
char *to = static_cast<char*>(sharedMemInstance.data());
const char *from = buffer.data().data();
memcpy(to, from, qMin(sharedMemInstance.size(), size));
buffer.close();
sharedMemInstance.unlock();
if (bHookedSteam && FindWindow(NULL, L"GloSC_OverlayWindow") == NULL)
{
unhookBindings();
}
}
void GloSC_GameLauncher::launchGame(QString type, QString path, QStringList args)
{
if (type == LGT_Win32)
{
QProcess app;
if (path.contains("\\"))
{
app.startDetached(path, args, path.mid(0, path.lastIndexOf("\\")), &pid);
}
else
{
app.startDetached(path, args, path.mid(0, path.lastIndexOf("/")), &pid);
}
} else if (type == LGT_UWP) {
DWORD pid = 0;
HRESULT hr = CoInitialize(nullptr);
std::wstring appUMId = path.toStdWString();
if (SUCCEEDED(hr)) {
HRESULT result = LaunchUWPApp(appUMId.c_str(), &pid);
if (SUCCEEDED(result))
{
this->pid = pid;
}
}
CoUninitialize();
}
}
HRESULT GloSC_GameLauncher::LaunchUWPApp(LPCWSTR packageFullName, PDWORD pdwProcessId)
{
CComPtr<IApplicationActivationManager> spAppActivationManager;
HRESULT result = E_INVALIDARG;
// Initialize IApplicationActivationManager
result = CoCreateInstance(CLSID_ApplicationActivationManager, NULL, CLSCTX_LOCAL_SERVER, IID_IApplicationActivationManager, (LPVOID*)&spAppActivationManager);
if (!SUCCEEDED(result))
return result;
//This call causes troubles; especially with our always in foreground overlay-window
/*
// This call ensures that the app is launched as the foreground window
result = CoAllowSetForegroundWindow(spAppActivationManager, NULL);
if (!SUCCEEDED(result))
return result;
*/
CoAllowSetForegroundWindow(spAppActivationManager, NULL); //try running it regardless
// Launch the app
result = spAppActivationManager->ActivateApplication(packageFullName, NULL, AO_NONE, pdwProcessId);
return result;
}
bool GloSC_GameLauncher::IsProcessRunning(DWORD pid)
{
HANDLE process = OpenProcess(SYNCHRONIZE, FALSE, pid);
DWORD ret = WaitForSingleObject(process, 1);
CloseHandle(process);
return ret == WAIT_TIMEOUT;
}
void GloSC_GameLauncher::unhookBindings()
{
QProcess proc;
proc.setNativeArguments(" --eject ");
proc.start("Injector.exe", QIODevice::ReadOnly);
proc.waitForFinished();
bHookedSteam = false;
}

@ -1,86 +0,0 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http ://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <Windows.h>
#include <atlbase.h>
#include <Shobjidl.h>
#include <appmodel.h>
#include <AppxPackaging.h>
#include <psapi.h>
#include <QtWidgets/QMainWindow>
#include "ui_GloSC_GameLauncher.h"
#include <QTimer>
#include <QSharedmemory>
#include <QRegularExpression>
#include <QBuffer>
#include <qprocess.h>
#include <qmessagebox.h>
class GloSC_GameLauncher : public QMainWindow
{
Q_OBJECT
public:
GloSC_GameLauncher(QWidget *parent = Q_NULLPTR);
public slots:
void isAboutToBeKilled();
private:
Ui::GloSC_GameLauncherClass ui;
const QString LaunchGame = "LaunchGame";
const QString LGT_UWP = "UWP";
const QString LGT_Win32 = "Win32";
const QString LaunchedProcessFinished = "LaunchedProcessFinished";
const QString IsSteamHooked = "IsSteamHooked";
const QStringList defaultSharedMemData = QStringList()
<< LaunchGame
<< ""
<< ""
<< ""
<< LaunchedProcessFinished
<< "0"
<< IsSteamHooked
<< "-1";
QSharedMemory sharedMemInstance;
QTimer updateTimer;
qint64 pid = NULL;
bool bHookedSteam = false;
void launchGame(QString type, QString path, QStringList args);
static HRESULT LaunchUWPApp(LPCWSTR packageFullName, PDWORD pdwProcessId);
static bool IsProcessRunning(DWORD pid);
void unhookBindings();
private slots:
void checkSharedMem();
};

@ -1,4 +0,0 @@
<RCC>
<qresource prefix="GloSC_GameLauncher">
</qresource>
</RCC>

@ -1,26 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<ui version="4.0">
<class>GloSC_GameLauncherClass</class>
<widget class="QMainWindow" name="GloSC_GameLauncherClass">
<property name="enabled">
<bool>false</bool>
</property>
<property name="geometry">
<rect>
<x>0</x>
<y>0</y>
<width>600</width>
<height>400</height>
</rect>
</property>
<property name="windowTitle">
<string>GloSC_GameLauncher</string>
</property>
<widget class="QWidget" name="centralWidget"/>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
<include location="GloSC_GameLauncher.qrc"/>
</resources>
<connections/>
</ui>

@ -1,227 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{431D29FD-73F8-4374-868B-F72972566F41}</ProjectGuid>
<Keyword>Qt4VSv1.0</Keyword>
<ProjectName>GloSC_GameLauncher</ProjectName>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v141</PlatformToolset>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="Shared" />
<ImportGroup Label="PropertySheets" />
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<Optimization>Disabled</Optimization>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>qtmaind.lib;Qt5Cored.lib;Qt5Guid.lib;Qt5Widgetsd.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat />
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>AsInvoker</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<PreprocessorDefinitions>UNICODE;WIN32;WIN64;QT_NO_DEBUG;NDEBUG;QT_CORE_LIB;QT_GUI_LIB;QT_WIDGETS_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>.\GeneratedFiles;.;$(QTDIR)\include;.\GeneratedFiles\$(ConfigurationName);$(QTDIR)\include\QtCore;$(QTDIR)\include\QtGui;$(QTDIR)\include\QtWidgets;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<DebugInformationFormat>
</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
<AdditionalDependencies>qtmain.lib;Qt5Core.lib;Qt5Gui.lib;Qt5Widgets.lib;%(AdditionalDependencies)</AdditionalDependencies>
<UACExecutionLevel>RequireAdministrator</UACExecutionLevel>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="GeneratedFiles\Debug\moc_GloSC_GameLauncher.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_GloSC_GameLauncher.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_GloSC_GameLauncher.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GloSC_GameLauncher.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="GloSC_GameLauncher.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing GloSC_GameLauncher.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing GloSC_GameLauncher.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing GloSC_GameLauncher.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing GloSC_GameLauncher.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="GloSC_GameLauncher.ui">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Uic%27ing %(Identity)...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\uic.exe;%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Uic%27ing %(Identity)...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Uic%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\ui_%(Filename).h;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\uic.exe" -o ".\GeneratedFiles\ui_%(Filename).h" "%(FullPath)"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_GloSC_GameLauncher.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="GloSC_GameLauncher.qrc">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Rcc%27ing %(Identity)...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Rcc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Rcc%27ing %(Identity)...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Rcc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\qrc_%(Filename).cpp;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\rcc.exe" -name "%(Filename)" -no-compress "%(FullPath)" -o .\GeneratedFiles\qrc_%(Filename).cpp</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="GloSC_GameLauncher.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="5.7_x86" Qt5Version_x0020_x64="5.10.1_x64" MocOptions="" />
</VisualStudio>
</ProjectExtensions>
</Project>

@ -1,81 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Form Files">
<UniqueIdentifier>{99349809-55BA-4b9d-BF79-8FDBB0286EB3}</UniqueIdentifier>
<Extensions>ui</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{D9D6E242-F8AF-46E4-B9FD-80ECBC20BA3E}</UniqueIdentifier>
<Extensions>qrc;*</Extensions>
<ParseFiles>false</ParseFiles>
</Filter>
<Filter Include="Generated Files">
<UniqueIdentifier>{71ED8ED8-ACB9-4CE9-BBE1-E00B30144E11}</UniqueIdentifier>
<Extensions>moc;h;cpp</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Generated Files\Debug">
<UniqueIdentifier>{1e9bf489-17aa-4034-b073-a718c40b9df3}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
<Filter Include="Generated Files\Release">
<UniqueIdentifier>{2f9e545c-e06b-44d9-ba46-8715517190c6}</UniqueIdentifier>
<Extensions>cpp;moc</Extensions>
<SourceControlFiles>False</SourceControlFiles>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GloSC_GameLauncher.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_GloSC_GameLauncher.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_GloSC_GameLauncher.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_GloSC_GameLauncher.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="GloSC_GameLauncher.h">
<Filter>Header Files</Filter>
</CustomBuild>
<CustomBuild Include="GloSC_GameLauncher.ui">
<Filter>Form Files</Filter>
</CustomBuild>
<CustomBuild Include="GloSC_GameLauncher.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="GeneratedFiles\ui_GloSC_GameLauncher.h">
<Filter>Generated Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="GloSC_GameLauncher.rc" />
</ItemGroup>
</Project>

@ -1,14 +0,0 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by GloSC_GameLauncher.rc
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 101
#define _APS_NEXT_COMMAND_VALUE 40001
#define _APS_NEXT_CONTROL_VALUE 1001
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
@ -19,9 +19,10 @@
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{0F6DB076-7345-487C-BA8C-E659EBB05962}</ProjectGuid>
<VCProjectVersion>15.0</VCProjectVersion>
<ProjectGuid>{752D3933-73A3-45E4-B139-CCB8C04BE543}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>Injector</RootNamespace>
<RootNamespace>GloSCWatchdog</RootNamespace>
<WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
@ -35,7 +36,7 @@
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v141</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<WholeProgramOptimization>false</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
@ -71,39 +72,40 @@
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<OutDir>$(SolutionDir)\build\Win32Only\$(Configuration)\</OutDir>
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<OutDir>$(SolutionDir)\build\Win32Only\$(Configuration)</OutDir>
<OutDir>$(SolutionDir)\build\$(Platform)\$(Configuration)\</OutDir>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -112,17 +114,20 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level1</WarningLevel>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<FunctionLevelLinking>
</FunctionLevelLinking>
<IntrinsicFunctions>false</IntrinsicFunctions>
<SDLCheck>
</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<ConformanceMode>false</ConformanceMode>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -130,13 +135,14 @@
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<PrecompiledHeader>Use</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
@ -146,15 +152,16 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Injector.cpp" />
<ClCompile Include="..\common\Injector.cpp" />
<ClCompile Include="main.cpp" />
</ItemGroup>
<ItemGroup>
<ClInclude Include="Injector.h" />
<ClInclude Include="..\common\Injector.h" />
<ClInclude Include="..\common\process_alive.h" />
<ClInclude Include="resource.h" />
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Injector.rc" />
<ResourceCompile Include="GloSC_Watchdog.rc" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">

@ -1,38 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Quelldateien">
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Headerdateien">
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Ressourcendateien">
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClCompile Include="main.cpp">
<Filter>Quelldateien</Filter>
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="Injector.cpp">
<Filter>Quelldateien</Filter>
<ClCompile Include="..\common\Injector.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="Injector.h">
<Filter>Headerdateien</Filter>
<ClInclude Include="..\common\Injector.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\common\process_alive.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource.h">
<Filter>Headerdateien</Filter>
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="Injector.rc">
<Filter>Ressourcendateien</Filter>
<ResourceCompile Include="GloSC_Watchdog.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
</ItemGroup>
</Project>

Binary file not shown.

@ -1,6 +1,7 @@
//{{NO_DEPENDENCIES}}
// Microsoft Visual C++ generated include file.
// Used by Injector.rc
// Used by GloSC_Watchdog.rc
// Next default values for new objects
//

@ -0,0 +1,135 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GloSC"
#define MyAppVersion "2.0.0"
#define MyAppPublisher "Peter Repukat - FlatspotSoftware"
#define MyAppURL "htpp://github.com/Alia5/GloSC"
#define MyAppExeName "GloSC.exe"
#define GloSCLauncherName "GloSC_GameLauncher.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{60BEAC2A-F5B7-4C81-9EB6-CF9FE75E7329}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=installer
LicenseFile=License.txt
InfoBeforeFile=Readme.md
OutputBaseFilename=GloSC-installer
PrivilegesRequired=admin
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "build\Win32\Release\GloSC.exe"; DestDir: "{app}"; Flags: ignoreversion;
Source: "build\Win32\Release\GloSC_Watchdog.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\Win32\Release\SteamTarget.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x86\bin\sfml-system-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x86\bin\sfml-window-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x86\bin\sfml-graphics-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "License.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.10.1\msvc2015\bin\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.10.1\msvc2015\bin\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.10.1\msvc2015\bin\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.10.1\msvc2015\bin\Qt5Network.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\Win32\Release\EnforceBindingDLL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "qt-license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "Readme.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "TargetConfig.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.10.1\msvc2015\plugins\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "redist\vc_redist_x86.exe"; DestDir: "{app}\redist"; Flags: ignoreversion
Source: "redist\Install_Update_ViGEm.ps1"; DestDir: "{app}\redist"; Flags: ignoreversion
Source: "redist\libeay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "redist\ssleay32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "redist\OpenSSL License.txt"; DestDir: "{app}"; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\redist\vc_redist_x86.exe"; Parameters: "/quiet /install"; Description: "Installing Redist. packages"; Flags: runascurrentuser;
Filename: "{win}\sysnative\WindowsPowerShell\v1.0\powershell.exe"; Parameters: "&'{app}\redist\Install_Update_ViGEm.ps1'"; Description: "Installing ViGEm Driver..."; Flags: runascurrentuser
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: runascurrentuser nowait postinstall skipifsilent
[InstallDelete]
Type: files; Name: "{app}"
[Code]
/////////////////////////////////////////////////////////////////////
function GetUninstallString(): String;
var
sUnInstPath: String;
sUnInstallString: String;
begin
sUnInstPath := ExpandConstant('Software\Microsoft\Windows\CurrentVersion\Uninstall\{#emit SetupSetting("60BEAC2A-F5B7-4C81-9EB6-CF9FE75E7329")}_is1');
sUnInstallString := '';
if not RegQueryStringValue(HKLM, sUnInstPath, 'UninstallString', sUnInstallString) then
RegQueryStringValue(HKCU, sUnInstPath, 'UninstallString', sUnInstallString);
Result := sUnInstallString;
end;
/////////////////////////////////////////////////////////////////////
function IsUpgrade(): Boolean;
begin
Result := (GetUninstallString() <> '');
end;
/////////////////////////////////////////////////////////////////////
function UnInstallOldVersion(): Integer;
var
sUnInstallString: String;
iResultCode: Integer;
begin
// Return Values:
// 1 - uninstall string is empty
// 2 - error executing the UnInstallString
// 3 - successfully executed the UnInstallString
// default return value
Result := 0;
// get the uninstall string of the old app
sUnInstallString := GetUninstallString();
if sUnInstallString <> '' then begin
sUnInstallString := RemoveQuotes(sUnInstallString);
if Exec(sUnInstallString, '/SILENT /NORESTART /SUPPRESSMSGBOXES','', SW_HIDE, ewWaitUntilTerminated, iResultCode) then
Result := 3
else
Result := 2;
end else
Result := 1;
end;
/////////////////////////////////////////////////////////////////////
procedure CurStepChanged(CurStep: TSetupStep);
begin
if (CurStep=ssInstall) then
begin
if (IsUpgrade()) then
begin
UnInstallOldVersion();
end;
end;
end;

@ -1,104 +0,0 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "GloSC"
#define MyAppVersion "1.4.2"
#define MyAppPublisher "Peter Repukat - FlatspotSoftware"
#define MyAppURL "htpp://github.com/Alia5/GloSC"
#define MyAppExeName "GloSC.exe"
#define GloSCLauncherName "GloSC_GameLauncher.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{60BEAC2A-F5B7-4C81-9EB6-CF9FE75E7329}}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=installer
LicenseFile=License.txt
InfoBeforeFile=Readme.md
OutputBaseFilename=GloSC-installer_x64
PrivilegesRequired=admin
Compression=lzma
SolidCompression=yes
ArchitecturesInstallIn64BitMode=x64
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "build\x64\Release\GloSC.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\x64\Release\GloSC_GameLauncher.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\x64\Release\SteamTarget.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x64\bin\sfml-system-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x64\bin\sfml-window-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "dependencies\SFML-2.4.2-x64\bin\sfml-graphics-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "License.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.9\msvc2017_64\bin\Qt5Core.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.9\msvc2017_64\bin\Qt5Gui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.9\msvc2017_64\bin\Qt5Widgets.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\Win32Only\Release\EnforceBindingDLL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "build\Win32Only\Release\Injector.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "qt-license.txt"; DestDir: "{app}"; Flags: ignoreversion
Source: "Readme.md"; DestDir: "{app}"; Flags: ignoreversion
Source: "TargetConfig.ini"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Qt\5.9\msvc2017_64\plugins\platforms\qwindows.dll"; DestDir: "{app}\platforms"; Flags: ignoreversion
Source: "redist\vc_redist_x64.exe"; DestDir: "{app}\redist"; Flags: ignoreversion
Source: "redist\vc_redist_x86.exe"; DestDir: "{app}\redist"; Flags: ignoreversion
Source: "redist\Install_Update_ViGEm.ps1"; DestDir: "{app}\redist"; Flags: ignoreversion
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\redist\vc_redist_x64.exe"; Parameters: "/quiet /install"; Description: "Installing Redist. packages"; Flags: runascurrentuser
Filename: "{app}\redist\vc_redist_x86.exe"; Parameters: "/quiet /install"; Description: "Installing Redist. packages"; Flags: runascurrentuser
Filename: "{win}\sysnative\WindowsPowerShell\v1.0\powershell.exe"; Parameters: "&'{app}\redist\Install_Update_ViGEm.ps1'"; Description: "Installing ViGEm Driver..."; Flags: runascurrentuser
Filename: "{sys}\schtasks.exe"; Parameters: "/delete /f /tn ""GloSC_GameLauncher"""; Flags: runascurrentuser
Filename: "{app}\{#GloSCLauncherName}"; Description: "Running GameLauncher"; Flags: nowait
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: runascurrentuser nowait postinstall skipifsilent
[Registry]
Root: HKCU; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "GloSC-GameLauncher"; ValueData: """{app}\GloSC_GameLauncher.exe"""; Flags: uninsdeletevalue
[InstallDelete]
Type: files; Name: "{app}"
[UninstallRun]
Filename: "{app}\redist\devcon_x64.exe"; Parameters: "remove Root\ViGEmBus"; Flags: runascurrentuser
Filename: "{sys}\taskkill.exe"; Parameters: "/T /F /IM {#GloSCLauncherName}";
Filename: "{sys}\schtasks.exe"; Parameters: "/delete /f /tn ""GloSC_GameLauncher"""; Flags: runascurrentuser
; Preinstallation Stuff...
[Code]
function PrepareToInstall(var NeedsRestart: Boolean): String;
var
ResultCode: integer;
begin
// Kill Program and wait for it to terminate
Exec(ExpandConstant('{sys}\taskkill.exe'), '/T /F /IM {#GloSCLauncherName}', '', SW_SHOW,
ewWaitUntilTerminated, ResultCode)
// Proceed Setup
Result := '';
end;

@ -1,132 +0,0 @@
#include "Injector.h"
#include <iostream>
void Injector::TakeDebugPrivilege()
{
HANDLE hProcess = GetCurrentProcess(), hToken;
TOKEN_PRIVILEGES priv;
LUID luid = { NULL };
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
LookupPrivilegeValue(0, SE_DEBUG_NAME, &luid);
priv.PrivilegeCount = 1;
priv.Privileges[0].Luid = luid;
priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, false, &priv, sizeof(priv), NULL, NULL);
CloseHandle(hToken);
CloseHandle(hProcess);
}
int Injector::Inject(DWORD pid, std::wstring &libPath)
{
HANDLE hProcess = NULL, allocAddress = NULL, hRemoteThread = NULL;
LPTHREAD_START_ROUTINE pfnThreadRtn = NULL;
size_t pathSize = (libPath.length() + 1) * sizeof(wchar_t);
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION | PROCESS_VM_WRITE, false, pid);
if (!hProcess)
return 1;
allocAddress = VirtualAllocEx(hProcess, NULL, pathSize, MEM_COMMIT, PAGE_READWRITE);
if (!allocAddress)
{
CloseHandle(hProcess);
return 2;
}
if (!WriteProcessMemory(hProcess, (LPVOID)allocAddress, libPath.c_str(), pathSize, NULL))
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 3;
}
pfnThreadRtn = reinterpret_cast<PTHREAD_START_ROUTINE>(GetProcAddress(GetModuleHandle(L"Kernel32"), "LoadLibraryW"));
if (!pfnThreadRtn)
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 4;
}
hRemoteThread = CreateRemoteThread(hProcess, NULL, 0, pfnThreadRtn, allocAddress, 0, NULL);
if (!hRemoteThread)
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 5;
}
WaitForSingleObject(hRemoteThread, INFINITE);
CloseHandle(hRemoteThread);
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 0;
}
int Injector::Eject(DWORD pid, std::wstring &libPath)
{
HANDLE hProcess = NULL, hRemoteThread = NULL;
HMODULE hLibMod = NULL;
LPTHREAD_START_ROUTINE pfnThreadRtn = NULL;
if (!findModule(pid, libPath, hLibMod))
return 2;
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION, false, pid);
if (!hProcess)
return 1;
pfnThreadRtn = (PTHREAD_START_ROUTINE) GetProcAddress(GetModuleHandle(L"Kernel32"), "FreeLibrary");
if (!pfnThreadRtn)
{
CloseHandle(hProcess);
return 3;
}
hRemoteThread = CreateRemoteThread(hProcess, NULL, NULL, pfnThreadRtn, hLibMod, NULL, NULL);
if (!hRemoteThread)
return 4;
WaitForSingleObject(hRemoteThread, INFINITE);
CloseHandle(hProcess);
return 0;
}
bool Injector::findModule(DWORD pid, std::wstring &libPath, HMODULE &hMod)
{
MODULEENTRY32W entry = { sizeof(entry) };
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
if (Module32FirstW(snapshot, &entry) == TRUE)
{
while (Module32NextW(snapshot, &entry) == TRUE)
{
std::wstring ModuleName(entry.szModule);
std::wstring ExePath(entry.szExePath);
if (ModuleName == libPath || ExePath == libPath)
{
hMod = (HMODULE)entry.modBaseAddr;
CloseHandle(snapshot);
return true;
}
}
}
CloseHandle(snapshot);
return false;
}

@ -1,20 +0,0 @@
#pragma once
#include <windows.h>
#include <tlhelp32.h>
#include <string>
class Injector {
public:
static void TakeDebugPrivilege();
static int Inject(DWORD pid, std::wstring &libPath);
static int Eject(DWORD pid, std::wstring &libPath);
private:
static bool findModule(DWORD pid, std::wstring &libPath, HMODULE &hMod);
};

@ -1,97 +0,0 @@
#include <iostream>
#include <Windows.h>
#include <tlhelp32.h>
#include "Injector.h"
#define dllName L"EnforceBindingDLL.dll";
int wmain(int argc, wchar_t* argv[])
{
if (argc < 2)
{
std::wcout << "Missing arguments" << std::endl;
return 1;
}
Injector::TakeDebugPrivilege();
wchar_t wcPath[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), wcPath, MAX_PATH);
std::wstring path(wcPath);
std::wstring libPath = path.substr(0, path.find_last_of(L"\\")+1) + dllName;
DWORD pid = NULL;
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (Process32First(snapshot, &entry) == TRUE)
{
while (Process32Next(snapshot, &entry) == TRUE)
{
if (_wcsicmp(entry.szExeFile, L"steam.exe") == 0)
{
pid = entry.th32ProcessID;
}
}
}
CloseHandle(snapshot);
if (pid == NULL)
{
std::wcout << "Can't detect Steam.exe running" << std::endl;
return 1;
}
if (std::wstring(argv[1]).find(L"--inject") != std::wstring::npos)
{
int result = Injector::Inject(pid, libPath);
switch (result)
{
case 0:
std::wcout << "Inject success!" << std::endl;
break;
case 1:
std::wcout << "Error: Couldn't open process" << std::endl;
break;
case 2:
std::wcout << "Error: Couldn't allocate memory" << std::endl;
break;
case 3:
std::wcout << "Error: Couldn't write memory" << std::endl;
break;
case 4:
std::wcout << "Error: Couldn't get pointer ro LoadLibraryW" << std::endl;
break;
case 5:
std::wcout << "Error: Couldn't start remote thread" << std::endl;
break;
}
}
else if (std::wstring(argv[1]).find(L"--eject") != std::wstring::npos)
{
int result = Injector::Eject(pid, libPath);
switch (result)
{
case 0:
std::wcout << "Eject success!" << std::endl;
break;
case 1:
std::wcout << "Error: Couldn't open process" << std::endl;
break;
case 2:
std::wcout << "Error: Couldn't find module in process" << std::endl;
break;
case 3:
std::wcout << "Error: Couldn't get pointer ro FreeLibrary" << std::endl;
break;
case 4:
std::wcout << "Error: Couldn't start remote thread" << std::endl;
break;
}
}
return 0;
}

@ -4,25 +4,21 @@
# GloSC
GloSC or Global SteamController is a small set of tools that allows you to use your SteamController as a system wide XInput-controller alongside a system wide (borderless window) Steam overlay
GloSC or Global SteamController is a tool that allows you to use your SteamController as a system wide XInput-controller alongside a system wide (borderless window) Steam overlay
All complete with **per application bindings and working rumble emulation.**
GloSC can also launch any of your favorite Games and directly add them to Steam, be it Win32 or UWP!
GloSC can, but isn't required to, launch any of your favorite games or applications and directly add them to Steam, be it Win32 or UWP!
It is **the tool** to enjoy any Game that has trouble with Steam and/or *add extra functionality* to your SteamController
It is **the tool** to enjoy any game that has trouble with Steam and/or *add extra functionality* to your SteamController
Play *UWP-Games*, use *Reshade / SweetFX*, *Origin* and *Uplay*-Games with **no hassle**
*UWP*, *Reshade / SweetFX*, *Origin* and *Uplay*-Games with **no hassle**
---
This thing started out as a giant hack / proof of concept, work has began on a cleaner and more maintainable [v2 branch](https://github.com/Alia5/GloSC/tree/v2)
---
**How does it work? / What does it do?**
GloSC creates and adds a (or multiple) non-Steam shortcuts to Steam. When one of those is launched, a transparent, borderless window appears where you can use the Steam-overlay, as well as get access to touch- and radial-menus and other functionality normally only present in Games
GloSC creates and adds a (or multiple) non-Steam shortcuts to Steam. When one of those is launched, a transparent, borderless window appears in which you can use the Steam-overlay. You also get access to touch- and radial-menus and other functionality normally only present in Games
In addition to that, XInput-inputs are redirected to the whole operating system, so that they will work with any game or application
@ -32,10 +28,11 @@ This brings full SteamController functionality to the desktop and any other appl
**Cleaning up misconceptions**
GloSC doesn't hook into any of your games, launched programs or any system-component, except into Steam itself to keep the controller from switching to desktop-config (if wanted)
GloSC doesn't hook into any of your games, launched programs or any system-component, except into Steam itself to keep the controller from switching to the desktop-config (if not disabled)
Games do not need to be launched using GloSC.
This is why you also don't need to launch any game using GloSC.
You can launch any GloSC-Shortcut from Steam and launch any game or application afterwards if the "Start Application" option causes any trouble.
If the "Start Application" option does not work, launch any GloSC-Shortcut from Steam, followed by a game or application.
```
@ -46,25 +43,32 @@ You can launch any GloSC-Shortcut from Steam and launch any game or application
* **Q: The overlay isn't showing up!**
A: The overlay only works for windowed or borderless windowed mode applications. Nothing much I can do here.
This is even true for UWP-Games! While it's true that UWP doesn't run exclusive fullscreen, , some Windows bullshit prevents unsigned apps from drawing over them.
This is even true for UWP-Games! While it's true that UWP doesn't run exclusive fullscreen, some Windows bullshit prevents unsigned apps from drawing over them.
Try running your games as borderless window
Try running your games as borderless window mode
* **Q: GloSC always creates four controllers**
A: Enable Xbox360 controller rebinding in Steam! It's in the "Controller" section in the Steam Settings.
* **Q: Some games (Gears of War 4, Forza Horizons 3) have odd double inputs with the bumper buttons and sticks**
* **Q: GloSC always creates four controllers, resulting in doubled inputs for some Games**
A: Enable Xbox360 controller rebinding in Steam! It's in the "Controller" section in the Steam Settings.
* **Q: Hitting the Steam Button + RT to take a screenshot doesn't work**
A: Another limitation that most likely won't be fixed, even if Steam would take a screenshot, you'd most likely get just a blank image
* **Q: The controller doesn't use my config**
A: In some cases the privileges of the launched application are higher than Steams, switching the controller to "Lizard-Mode"
Try running Steam **as Admin**
* **Q: GloSC overlay causes the screen to be black**
A: If running on mobile, open up Nvidia control panel (right click your Desktop and select it). Manage 3D-settings and have it auto select your graphics processor, if not then maybe try adding an exclusive fix for Steam on program settings tab.
A: If running on mobile, open up NVidia control panel (right click your Desktop and select it). Manage the 3D-settings and have it auto select your graphics processor.
Alternatively there is the _`bEnableOverlayOnlyConfig`_ setting in GloSC's .ini files.
If this flag is set, the overlay is only shown if it is opened.
This will, unfortunately, also prevent you from using touch- and radial-menus.
Instructions for AMD GPUs should be similar, in case any issues occur.
```
```
@ -75,9 +79,10 @@ Join the GloSC discord here: https://discord.gg/T9b4D5y
**GloSC consists of:**
* A main application ("GloSC") allowing you to create and configure new shortcuts or "SteamTargets" and automatically add them to Steam
* The "GloSC-GameLauncher" which can launch Win32 and UWP games and mainly exists to work around dual overlays
* A main application ("GloSC") handling shortcut ("SteamTarget") creation and their addition to Steam.
* The "SteamTarget" which does most of the magic - Showing the overlay to the user as well as talking to the ViGEm-driver for system wide Controller emulation
* A GloSC Watchdog making sure Steam get's unhooked once a "SteamTarget" is closed.
* EnforceBindingDLL that gets injected into Steam, preventing the controller switching to the desktop-config
---
@ -93,7 +98,7 @@ GloSC is not affiliated with Valve, Steam, or any of their partners.
---
GloSC is built using [Qt 5.9](https://www.qt.io/) and [SFML](http://www.sfml-dev.org/) for drawing the overlay
GloSC is built using [Qt 5.X](https://www.qt.io/) and [SFML](http://www.sfml-dev.org/) for drawing the overlay
The system wide Xbox-Controller works via [ViGEm](https://github.com/nefarius/ViGEm)

@ -0,0 +1,75 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <Windows.h>
class SteamTarget;
namespace overlay_hook
{
DWORD JMPBackOpen;
DWORD JMPBackClosed;
TargetOverlay* target_overlay;
__declspec(naked) void overlay_opend_hookFN()
{
//excute overrriden instructions
__asm {
push esi
mov byte ptr ds : [esi + 0x28], 1
}
//our hook code...
target_overlay->onOverlayOpened();
//std::cout << "Opened!\n";
//jump back
__asm
{
jmp[JMPBackOpen] //jump back and continiue with original steam function
}
}
__declspec(naked) void overlay_closed_hookFN()
{
//excute overrriden instructions
__asm {
mov dword ptr ds : [esi + 0x24], 0
mov byte ptr ds : [esi + 0x28], 0
}
//our hook code...
target_overlay->onOverlayClosed();
//std::cout << "Closed!\n";
//jump back
__asm
{
jmp[JMPBackClosed] //jump back and continiue with original steam function
}
}
}

@ -0,0 +1,293 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "SteamTarget.h"
#include "OverlayHookFunction.h"
#include "../common/common_hookfuns.h"
#include "../common/Injector.h"
#include "../common/process_alive.h"
#define LOGURU_IMPLEMENTATION 1
#include "../common/loguru.hpp"
#include <QProcess>
#include <QDir>
#include <QFile>
#include <QTextStream>
#include <QTimer>
#include <QSettings>
#include <qmessagebox.h>
#include <iostream>
#include <Windows.h>
#include <atlbase.h>
#include <Shobjidl.h>
SteamTarget::SteamTarget(int& argc, char** argv) : QApplication(argc, argv)
{
loguru::init(argc, argv);
}
void SteamTarget::init()
{
loguru::add_file("last.log", loguru::Truncate, loguru::Verbosity_INFO);
connect(this, SIGNAL(aboutToQuit()), this, SLOT(onAboutToQuit()));
SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ConsoleCtrlCallback), true);
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
readIni();
target_overlay_.init(!enable_overlay_, enable_overlay_only_config_);
initOverlayEvents();
controller_thread_ = std::make_unique<VirtualControllerThread>(update_rate_);
if (enable_controllers_)
controller_thread_->run();
if (hook_steam_ && !use_desktop_conf_)
Injector::hookSteam();
launchWatchdog();
if (launch_game_)
launchApplication();
sys_tray_icon_.setIcon(QIcon(":/SteamTarget/Resources/GloSC_Icon.png"));
tray_icon_menu_.addAction("Quit");
sys_tray_icon_.setContextMenu(&tray_icon_menu_);
connect(&sys_tray_icon_, SIGNAL(activated(QSystemTrayIcon::ActivationReason)),
this, SLOT(iconActivated(QSystemTrayIcon::ActivationReason)));
connect(*tray_icon_menu_.actions().begin(), SIGNAL(triggered()), this, SLOT(quit()));
}
BOOL SteamTarget::ConsoleCtrlCallback(DWORD dwCtrlType)
{
if (dwCtrlType == CTRL_CLOSE_EVENT || dwCtrlType == CTRL_BREAK_EVENT || dwCtrlType == CTRL_C_EVENT)
{
quit();
return true;
}
return false;
}
void SteamTarget::onAboutToQuit()
{
if (hook_steam_ && !use_desktop_conf_)
Injector::unhookSteam();
controller_thread_->stop();
target_overlay_.stop();
}
void SteamTarget::readIni()
{
if (arguments().size() == 1)
{
LOG_F(WARNING, "Target configuration file must be specified! Using default Values!");
QMessageBox::warning(nullptr, "GloSC", "Target configuration file must be specified! Using default Values!");
}
else {
QSettings settings(arguments().at(1), QSettings::IniFormat);
settings.beginGroup("BaseConf");
QStringList childKeys = settings.childKeys();
for (auto &childkey : childKeys)
{
if (childkey == "bEnableOverlay") {
enable_overlay_ = settings.value(childkey).toBool();
}
if (childkey == "bEnableOverlayOnlyConfig") {
enable_overlay_only_config_ = settings.value(childkey).toBool();
}
else if (childkey == "bEnableControllers") {
enable_controllers_ = settings.value(childkey).toBool();
}
else if (childkey == "bHookSteam") {
hook_steam_ = settings.value(childkey).toBool();
}
else if (childkey == "bUseDesktopConfig") {
use_desktop_conf_ = settings.value(childkey).toBool();
}
else if (childkey == "iUpdateRate") {
bool isInt = false;
update_rate_ = settings.value(childkey).toInt(&isInt);
if (!isInt)
update_rate_ = 5000;
if (update_rate_ < 0)
update_rate_ = 5000;
}
}
settings.endGroup();
settings.beginGroup("LaunchGame");
childKeys = settings.childKeys();
for (auto &childkey : childKeys)
{
if (childkey == "bLaunchGame") {
launch_game_ = settings.value(childkey).toBool();
}
else if (childkey == "Path") {
launch_app_path_ = settings.value(childkey).toString().toStdString();
}
else if (childkey == "Type") {
launch_uwp_ = settings.value(childkey).toString() == QString("UWP");
}
else if (childkey == "bCloseWhenDone") {
close_launched_done_ = settings.value(childkey).toBool();
}
}
settings.endGroup();
}
}
void SteamTarget::initOverlayEvents()
{
//You hook into **MY** process? I'm ready to play your games, Valve! I'll hook back!!! 😅
const DWORD addressOpen = hook_commons::FindPattern(overlay_module_name,
overlay_open_func_sig,
overlay_open_func_mask);
if (addressOpen != 0)
{
DWORD addressClosed = 0;
for (DWORD i = 0; i < 1024; i++) //search next signature relativ to "addressOpened"
{
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)
{
overlay_hook::JMPBackOpen = addressOpen + std::string(overlay_open_func_mask).length();
overlay_hook::JMPBackClosed = addressClosed + std::string(overlay_closed_func_mask).length();
overlay_hook::target_overlay = &target_overlay_;
hook_commons::PlaceJMP(reinterpret_cast<BYTE*>(addressOpen),
reinterpret_cast<DWORD>(overlay_hook::overlay_opend_hookFN), std::string(overlay_open_func_mask).length());
hook_commons::PlaceJMP(reinterpret_cast<BYTE*>(addressClosed),
reinterpret_cast<DWORD>(overlay_hook::overlay_closed_hookFN), std::string(overlay_closed_func_mask).length());
} else {
LOG_F(WARNING, "Failed to find overlayClosed signature!");
}
} else {
LOG_F(WARNING, "Failed to find overlayOpened signature!");
}
}
void SteamTarget::launchWatchdog() const
{
const QString watchDogPath = QDir::toNativeSeparators(applicationDirPath()) + "\\GloSC_Watchdog.exe";
if(QProcess::startDetached("explorer.exe", QStringList() << watchDogPath))
LOG_F(INFO, "Launched Watchdog");
else
LOG_F(WARNING, "Failed to launch Watchdog!");
}
void SteamTarget::launchApplication()
{
if (!launch_uwp_)
{
// To get our launched application not get hooked by Steam, we have to launch through Windows explorer
// To use arguments, launching using explorer, we have to use a batch file...
const QString batchContents = '\"' + QDir::toNativeSeparators(QString::fromStdString(launch_app_path_))
+ '\"' + " " + QString::fromStdString(launch_app_args_);
QFile file("launchApp.bat");
if (file.open(QIODevice::ReadWrite | QIODevice::Text | QIODevice::Truncate)) {
QTextStream stream(&file);
stream << "@Echo off\n" << batchContents;
file.close();
const QString launchPath = QDir::toNativeSeparators(applicationDirPath()) + "\\launchApp.bat";
QProcess::startDetached("explorer.exe", QStringList() << launchPath);
if (close_launched_done_)
{
const QString appName = QDir::toNativeSeparators(QString::fromStdString(launch_app_path_)).split('\\').last();
connect(&launch_check_timer_, &QTimer::timeout, [appName]()
{
if (!process_alive::IsProcessRunning(appName.toStdWString().c_str()))
SteamTarget::quit();
});
QTimer::singleShot(10000, this, [this]()
{
launch_check_timer_.start(1000);
});
}
}
}
else
{
// We don't need such bullshit explorer tricks when dealing with UWP, as Valve still hasn't figured out how to hook them.
// Or they just don't wan't to
// If you're interested in how to hook UWP: https://behind.flatspot.pictures/hacking-windows-universal-apps-uwp/
DWORD pid = 0;
const HRESULT hr = CoInitialize(nullptr);
std::wstring appUMId = QString::fromStdString(launch_app_path_).toStdWString();
if (SUCCEEDED(hr)) {
const HRESULT result = LaunchUWPApp(appUMId.c_str(), &pid);
if (SUCCEEDED(result))
{
if (close_launched_done_)
{
connect(&launch_check_timer_, &QTimer::timeout, [pid]()
{
if (!process_alive::IsProcessRunning(pid))
SteamTarget::quit();
});
QTimer::singleShot(10000, this, [this]()
{
launch_check_timer_.start(1000);
});
}
}
}
CoUninitialize();
}
}
HRESULT SteamTarget::LaunchUWPApp(LPCWSTR packageFullName, PDWORD pdwProcessId)
{
CComPtr<IApplicationActivationManager> spAppActivationManager;
HRESULT result = E_INVALIDARG;
// Initialize IApplicationActivationManager
result = CoCreateInstance(CLSID_ApplicationActivationManager, NULL, CLSCTX_LOCAL_SERVER, IID_IApplicationActivationManager, (LPVOID*)&spAppActivationManager);
if (!SUCCEEDED(result))
return result;
// This call ensures that the app is launched as the foreground window and sometimes may randomly fail...
result = CoAllowSetForegroundWindow(spAppActivationManager, NULL);
// Launch the app
result = spAppActivationManager->ActivateApplication(packageFullName, NULL, AO_NONE, pdwProcessId);
return result;
}

@ -0,0 +1,107 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/*
SteamTarget - Does most of GloSCs heavy lifting.
*/
#pragma once
#include "TargetOverlay.h"
#include "VirtualControllerThread.h"
#include <QApplication>
#include <QTimer>
#include <QSystemTrayIcon>
#include <QMenu>
#include <functional>
#include <Windows.h>
#include <dwmapi.h>
class SteamTarget : public QApplication
{
Q_OBJECT
public:
SteamTarget(int& argc, char** argv);
SteamTarget(const SteamTarget& other) = delete;
SteamTarget(SteamTarget&& other) noexcept = delete;
SteamTarget& operator=(const SteamTarget& other) = delete;
SteamTarget& operator=(SteamTarget&& other) noexcept = delete;
~SteamTarget() = default;
void init();
static BOOL WINAPI ConsoleCtrlCallback(DWORD dwCtrlType);
public slots:
void onAboutToQuit();
private:
void readIni();
void initOverlayEvents();
void launchWatchdog() const;
void launchApplication();
static HRESULT LaunchUWPApp(LPCWSTR packageFullName, PDWORD pdwProcessId);
TargetOverlay target_overlay_;
std::unique_ptr<VirtualControllerThread> controller_thread_;
//Settings from .ini file
bool hook_steam_ = true;
bool enable_overlay_ = true;
bool enable_overlay_only_config_ = false;
bool enable_controllers_ = true;
bool use_desktop_conf_ = false;
bool launch_game_ = false;
bool close_launched_done_ = false;
bool launch_uwp_ = false;
std::string launch_app_path_ = "";
std::string launch_app_args_ = "";
int update_rate_ = 5000;
QTimer launch_check_timer_;
QSystemTrayIcon sys_tray_icon_;
QMenu tray_icon_menu_;
//Hooking stuff...
#ifdef _AMD64_
constexpr static const char* overlay_module_name = "GameOverlayRenderer64.dll";
constexpr static const char* overlay_open_func_sig = "TODO";
constexpr static const char* overlay_open_func_mask= "TODO";
#else
constexpr static const char* overlay_module_name = "GameOverlayRenderer.dll";
constexpr static const char* overlay_open_func_sig = "\x56\xC6\x46\x28\x01";
constexpr static const char* overlay_open_func_mask = "xxxxx";
constexpr static const char* overlay_closed_func_sig = "\xC7\x46\x24\x00\x00\x00\x00\xC6\x46\x28\x00";
constexpr static const char* overlay_closed_func_mask = "xxxxxxxxxxx";
#endif
};

Binary file not shown.

@ -82,9 +82,10 @@
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<TreatWChar_tAsBuiltInType>true</TreatWChar_tAsBuiltInType>
<LanguageStandard>stdcpp14</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\dependencies\VigemClient\;..\dependencies\SFML-2.4.2-x86\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>true</GenerateDebugInformation>
@ -123,7 +124,7 @@
</UndefinePreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<SubSystem>Windows</SubSystem>
<OutputFile>$(OutDir)\$(ProjectName).exe</OutputFile>
<AdditionalLibraryDirectories>..\dependencies\VigemClient\;..\dependencies\SFML-2.4.2-x86\lib;$(QTDIR)\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<GenerateDebugInformation>false</GenerateDebugInformation>
@ -131,9 +132,10 @@
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="GeneratedFiles\Debug\moc_SteamTargetRenderer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
<ClCompile Include="..\common\Injector.cpp" />
<ClCompile Include="GeneratedFiles\Debug\moc_SteamTarget.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="GeneratedFiles\qrc_SteamTarget.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
@ -145,34 +147,15 @@
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
</PrecompiledHeader>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_SteamTargetRenderer.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
<ClCompile Include="GeneratedFiles\Release\moc_SteamTarget.cpp">
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">true</ExcludedFromBuild>
</ClCompile>
<ClCompile Include="main.cpp" />
<ClCompile Include="SteamTargetRenderer.cpp" />
<ClCompile Include="SteamTarget.cpp" />
<ClCompile Include="TargetOverlay.cpp" />
<ClCompile Include="VirtualControllerThread.cpp" />
</ItemGroup>
<ItemGroup>
<CustomBuild Include="SteamTargetRenderer.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing SteamTargetRenderer.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing SteamTargetRenderer.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_AMD64_ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x64\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_X86_ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x86\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing SteamTargetRenderer.h...</Message>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing SteamTargetRenderer.h...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_AMD64_ -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x64\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_X86_ -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x86\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
</CustomBuild>
</ItemGroup>
<ItemGroup>
<CustomBuild Include="SteamTarget.qrc">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
@ -194,7 +177,30 @@
</CustomBuild>
</ItemGroup>
<ItemGroup>
<ClInclude Include="..\common\common_hookfuns.h" />
<ClInclude Include="..\common\Injector.h" />
<ClInclude Include="..\common\process_alive.h" />
<ClInclude Include="OverlayHookFunction.h" />
<ClInclude Include="resource.h" />
<CustomBuild Include="SteamTarget.h">
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_X86_ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x86\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_AMD64_ -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x64\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_X86_ -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x86\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">$(QTDIR)\bin\moc.exe;%(FullPath)</AdditionalInputs>
<Message Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Moc%27ing %(Identity)...</Message>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">"$(QTDIR)\bin\moc.exe" "%(FullPath)" -o ".\GeneratedFiles\$(ConfigurationName)\moc_%(Filename).cpp" -DUNICODE -DWIN32 -DWIN64 -D_CONSOLE -D_AMD64_ -DQT_NO_DEBUG -DNDEBUG -DQT_CORE_LIB -DQT_GUI_LIB -DQT_WIDGETS_LIB "-I.\..\dependencies\ViGEmClient" "-I.\..\dependencies\SFML-2.4.2-x64\include" "-I.\GeneratedFiles" "-I." "-I$(QTDIR)\include" "-I.\GeneratedFiles\$(ConfigurationName)\." "-I$(QTDIR)\include\QtCore" "-I$(QTDIR)\include\QtGui" "-I$(QTDIR)\include\QtWidgets"</Command>
</CustomBuild>
<ClInclude Include="TargetOverlay.h" />
<ClInclude Include="VirtualControllerThread.h" />
</ItemGroup>
<ItemGroup>
@ -212,7 +218,7 @@
</ImportGroup>
<ProjectExtensions>
<VisualStudio>
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="5.7_x86" Qt5Version_x0020_x64="5.10.1_x64" MocOptions="" />
<UserProperties MocDir=".\GeneratedFiles\$(ConfigurationName)" UicDir=".\GeneratedFiles" RccDir=".\GeneratedFiles" lupdateOptions="" lupdateOnBuild="0" lreleaseOptions="" Qt5Version_x0020_Win32="msvc2015" Qt5Version_x0020_x64="5.10.1_x64" MocOptions="" />
</VisualStudio>
</ProjectExtensions>
</Project>

@ -46,16 +46,22 @@
<ClCompile Include="GeneratedFiles\qrc_SteamTarget.cpp">
<Filter>Generated Files</Filter>
</ClCompile>
<ClCompile Include="SteamTargetRenderer.cpp">
<ClCompile Include="VirtualControllerThread.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="SteamTarget.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Debug\moc_SteamTargetRenderer.cpp">
<ClCompile Include="GeneratedFiles\Debug\moc_SteamTarget.cpp">
<Filter>Generated Files\Debug</Filter>
</ClCompile>
<ClCompile Include="GeneratedFiles\Release\moc_SteamTargetRenderer.cpp">
<ClCompile Include="GeneratedFiles\Release\moc_SteamTarget.cpp">
<Filter>Generated Files\Release</Filter>
</ClCompile>
<ClCompile Include="VirtualControllerThread.cpp">
<ClCompile Include="TargetOverlay.cpp">
<Filter>Source Files</Filter>
</ClCompile>
<ClCompile Include="..\common\Injector.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
@ -63,7 +69,7 @@
<CustomBuild Include="SteamTarget.qrc">
<Filter>Resource Files</Filter>
</CustomBuild>
<CustomBuild Include="SteamTargetRenderer.h">
<CustomBuild Include="SteamTarget.h">
<Filter>Header Files</Filter>
</CustomBuild>
</ItemGroup>
@ -74,6 +80,21 @@
<ClInclude Include="VirtualControllerThread.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\common\common_hookfuns.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="OverlayHookFunction.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\common\Injector.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\common\process_alive.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="TargetOverlay.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ResourceCompile Include="SteamTarget.rc" />

@ -1,543 +0,0 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "SteamTargetRenderer.h"
std::atomic<bool> SteamTargetRenderer::overlayOpen = false;
HHOOK SteamTargetRenderer::hook = nullptr;
std::atomic<bool> SteamTargetRenderer::bHookSteam = false;
SteamTargetRenderer::SteamTargetRenderer(int& argc, char** argv) : QApplication(argc, argv)
{
getSteamOverlay();
loadLogo();
SetConsoleCtrlHandler(reinterpret_cast<PHANDLER_ROUTINE>(ConsoleCtrlCallback), true);
if (this->arguments().size() == 1)
{
std::cerr << "Target configuration file must be specified!" << std::endl;
MessageBoxW(NULL, L"Target configuration file must be specified!", L"GloSC-SteamTarget", MB_OK);
QTimer::singleShot(0, this, []()
{
QApplication::exit(1);
}); //call after ctor
} else {
QSettings settings(this->arguments().at(1), QSettings::IniFormat);
settings.beginGroup("BaseConf");
const QStringList childKeys = settings.childKeys();
for (auto &childkey : childKeys)
{
if (childkey == "bDrawDebugEdges")
{
bDrawDebugEdges = settings.value(childkey).toBool();
}
else if (childkey == "bEnableOverlay") {
bDrawOverlay = settings.value(childkey).toBool();
}
else if (childkey == "bEnableControllers") {
bEnableControllers = settings.value(childkey).toBool();
}
else if (childkey == "bHookSteam") {
bHookSteam = settings.value(childkey).toBool();
}
else if (childkey == "bUseDesktopConfig") {
bUseDesktopConfig = settings.value(childkey).toBool();
}
}
settings.endGroup();
#ifndef NDEBUG
bDrawDebugEdges = true;
#endif // NDEBUG
sfCshape = sf::CircleShape(100.f);
sfCshape.setFillColor(sf::Color(128, 128, 128, 128));
sfCshape.setOrigin(sf::Vector2f(100, 100));
sf::VideoMode mode = sf::VideoMode::getDesktopMode();
sfWindow.create(sf::VideoMode(mode.width - 16, mode.height - 32), "GloSC_OverlayWindow"); //Window is too large ; always 16 and 32 pixels? - sf::Style::None breaks transparency!
sfWindow.setFramerateLimit(iRefreshRate);
sfWindow.setPosition(sf::Vector2i(0, 0));
makeSfWindowTransparent(sfWindow);
sfWindow.setActive(false);
consoleHwnd = GetConsoleWindow(); //We need a console for a dirty hack to make sure we stay in game bindings
//QT Windows cause trouble with the overlay, so we cannot use them
#ifdef NDEBUG
ShowWindow(consoleHwnd, SW_HIDE);
#endif // NDEBUG
if (bEnableControllers)
controllerThread.run();
QTimer::singleShot(2000, this, &SteamTargetRenderer::launchApp); // lets steam do its thing
if (hmodGameOverlayRenderer != nullptr)
{
//Hook MessageQueue to detect if overlay gets opened / closed
//Steam Posts a Message with 0x14FA / 0x14F7 when the overlay gets opened / closed
hook = SetWindowsHookEx(WH_GETMESSAGE, HookCallback, nullptr, GetCurrentThreadId());
}
if (bUseDesktopConfig)
{
bHookSteam = false;
QTimer::singleShot(1000, this, []()
{
HWND taskbar = FindWindow(L"Shell_TrayWnd", nullptr);
SetFocus(taskbar);
SetForegroundWindow(taskbar);
});
}
}
}
SteamTargetRenderer::~SteamTargetRenderer()
{
if (hmodGameOverlayRenderer != nullptr)
{
UnhookWindowsHookEx(hook);
}
renderThread.join();
if (controllerThread.isRunning())
controllerThread.stop();
}
void SteamTargetRenderer::run()
{
renderThread = std::thread(&SteamTargetRenderer::RunSfWindowLoop, this);
}
void SteamTargetRenderer::stop()
{
bRunLoop = false;
unhookBindings();
QApplication::exit(0);
}
void SteamTargetRenderer::RunSfWindowLoop()
{
if (!bRunLoop)
return;
sfWindow.setActive(true);
bool hasJustLaunched = true;
if (bDrawOverlay)
SetWindowPos(sfWindow.getSystemHandle(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_ASYNCWINDOWPOS);
else
{
ShowWindow(sfWindow.getSystemHandle(), SW_HIDE);
sfWindow.setFramerateLimit(1); //Window is not shown anyway,
ShowWindow(consoleHwnd, SW_SHOW); //Show the console window so the user sees SOMETHING
}
while (sfWindow.isOpen() && bRunLoop)
{
sf::Event event;
while (sfWindow.pollEvent(event))
{
if (event.type == sf::Event::Closed)
sfWindow.close();
}
sfWindow.clear(sf::Color::Transparent);
if (bDrawDebugEdges)
drawDebugEdges();
//we inject and hook here to spare IPC and let the dll grab the steam appID of the launched process when the config switches (config switches w/ focus)
if (hasJustLaunched)
{
if (bHookSteam)
hookBindings(); //cleanup - unhooking / unloading of dll is managed by the GloSC gamelauncher rather than here
hasJustLaunched = false;
}
//Window focus trickery
if (hmodGameOverlayRenderer != nullptr)
{
if (overlayOpen)
{
if (!bNeedFocusSwitch)
{
bNeedFocusSwitch = true;
hwForeGroundWindow = GetForegroundWindow();
std::cout << "Saving current ForegorundWindow HWND: " << hwForeGroundWindow << std::endl;
std::cout << "Activating OverlayWindow" << std::endl;
SetWindowLong(sfWindow.getSystemHandle(), GWL_EXSTYLE, WS_EX_LAYERED); //make overlay window clickable
//Actually activate the overlaywindow
stealFocus(sfWindow.getSystemHandle());
//Move the mouse cursor inside the overlaywindow
//this is neccessary because steam doesn't want to switch to big picture bindings if mouse isn't inside
moveMouseIntoOverlay();
}
sfWindow.draw(backgroundSprite);
} else {
if (bNeedFocusSwitch)
{
std::cout << "Deactivating OverlayWindow" << std::endl;
//make overlaywindow clickthrough - WS_EX_TRANSPARENT - again
SetWindowLong(sfWindow.getSystemHandle(), GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT);
std::cout << "Switching to previously focused window" << std::endl;
//switch back the the previosly focused window
stealFocus(hwForeGroundWindow);
bNeedFocusSwitch = false;
}
}
}
sfWindow.display();
}
stop();
}
void SteamTargetRenderer::getSteamOverlay()
{
hmodGameOverlayRenderer = GetModuleHandle(overlayModuleName);
if (hmodGameOverlayRenderer != nullptr)
{
std::cout << overlayModuleName << " found; Module at: 0x" << hmodGameOverlayRenderer << std::endl;
}
}
void SteamTargetRenderer::makeSfWindowTransparent(sf::RenderWindow & window)
{
HWND hwnd = window.getSystemHandle();
SetWindowLong(hwnd, GWL_STYLE, WS_VISIBLE | WS_POPUP &~WS_CAPTION);
SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST);
MARGINS margins;
margins.cxLeftWidth = -1;
DwmExtendFrameIntoClientArea(hwnd, &margins);
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
window.clear(sf::Color::Transparent);
window.display();
}
void SteamTargetRenderer::drawDebugEdges()
{
sfCshape.setPosition(sf::Vector2f(-25, -25));
sfWindow.draw(sfCshape);
sfCshape.setPosition(sf::Vector2f(sfWindow.getSize().x + 25, -25));
sfWindow.draw(sfCshape);
sfCshape.setPosition(sf::Vector2f(-25, sfWindow.getSize().y));
sfWindow.draw(sfCshape);
sfCshape.setPosition(sf::Vector2f(sfWindow.getSize().x, sfWindow.getSize().y));
sfWindow.draw(sfCshape);
}
void SteamTargetRenderer::hookBindings() const
{
std::cout << "Hooking Steam..." << std::endl;
QString dir = QDir::toNativeSeparators(QCoreApplication::applicationDirPath());
dir = dir.mid(0, dir.lastIndexOf("\\"));
QProcess proc;
proc.setNativeArguments(" --inject ");
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;
//tell the GloSC_GameLauncher that we have hooked steam
//it will deal with checking if the target is still alive and unload the dll / unhook then
// - ensures unloading / unhooking even if this process crashes or gets unexpectedly killed
QSharedMemory sharedMemInstance("GloSC_GameLauncher");
if (!sharedMemInstance.create(1024) && sharedMemInstance.error() == QSharedMemory::AlreadyExists)
{
QBuffer buffer;
QDataStream dataStream(&buffer);
QStringList stringList;
sharedMemInstance.attach();
sharedMemInstance.lock();
buffer.setData(static_cast<const char*>(sharedMemInstance.constData()), sharedMemInstance.size());
buffer.open(QBuffer::ReadOnly);
dataStream >> stringList;
buffer.close();
int i = stringList.indexOf(IsSteamHooked) + 1;
stringList.replace(i, "1");
buffer.open(QBuffer::ReadWrite);
QDataStream out(&buffer);
out << stringList;
int size = buffer.size();
char *to = static_cast<char*>(sharedMemInstance.data());
const char *from = buffer.data().data();
memcpy(to, from, qMin(sharedMemInstance.size(), size));
buffer.close();
sharedMemInstance.unlock();
sharedMemInstance.detach();
}
} else {
std::cout << "Hooking Steam failed!" << std::endl;
MessageBoxW(NULL, L"Hooking Steam failed!", L"GloSC-SteamTarget", MB_OK);
}
}
void SteamTargetRenderer::loadLogo()
{
HRSRC rsrcData = FindResource(NULL, L"ICOPNG", RT_RCDATA);
DWORD rsrcDataSize = SizeofResource(NULL, rsrcData);
HGLOBAL grsrcData = LoadResource(NULL, rsrcData);
LPVOID firstByte = LockResource(grsrcData);
spriteTexture = std::make_unique<sf::Texture>();
spriteTexture->loadFromMemory(firstByte, rsrcDataSize);
backgroundSprite.setTexture(*spriteTexture);
backgroundSprite.setOrigin(sf::Vector2f(spriteTexture->getSize().x / 2.f, spriteTexture->getSize().y / 2));
sf::VideoMode winSize = sf::VideoMode::getDesktopMode();
backgroundSprite.setPosition(sf::Vector2f(winSize.width / 2.f, winSize.height / 2.f));
}
void SteamTargetRenderer::moveMouseIntoOverlay()
{
RECT rect = { 0 };
if (GetWindowRect(sfWindow.getSystemHandle(), &rect))
{
POINT cursorPos = { 0 };
GetCursorPos(&cursorPos);
if (PtInRect(&rect, cursorPos))
{
SetCursorPos(cursorPos.x+1, cursorPos.y);
}
else
{
SetCursorPos(rect.left + 16, rect.top + 16);
}
}
}
//WinHook Callback to check if the overlay is opened/closed
LRESULT WINAPI SteamTargetRenderer::HookCallback(int nCode, WPARAM wParam, LPARAM lParam)
{
if (nCode >= 0)
{
PMSG msg = reinterpret_cast<PMSG>(lParam);
std::cout << "DEBUG: " << "message: " << msg->message << std::endl;
if (msg->message == 0x14FA || msg->message == 0x14FF) //Posted when the overlay gets opened
{
overlayOpen = true;
std::cout << "Overlay Opened!\n";
}
else if (msg->message == 0x14F7 || msg->message == 0x14FD || msg->message == 512 || msg->message == 0x2a3)
{
overlayOpen = false;
std::cout << "Overlay closed!\n";
}
}
return CallNextHookEx(hook, nCode, wParam, lParam);
}
void SteamTargetRenderer::unhookBindings()
{
if (bHookSteam)
{
QString dir = QDir::toNativeSeparators(QCoreApplication::applicationDirPath());
dir = dir.mid(0, dir.lastIndexOf("\\"));
QProcess proc;
proc.setNativeArguments(" --eject ");
proc.setWorkingDirectory(dir);
proc.start("./Injector.exe", QIODevice::ReadOnly);
proc.waitForStarted();
proc.waitForFinished();
}
}
BOOL SteamTargetRenderer::ConsoleCtrlCallback(DWORD dwCtrlType)
{
if (dwCtrlType == CTRL_CLOSE_EVENT || dwCtrlType == CTRL_BREAK_EVENT || dwCtrlType == CTRL_C_EVENT)
{
unhookBindings();
return true;
}
return false;
}
void SteamTargetRenderer::stealFocus(HWND hwnd)
{
DWORD dwCurrentThread = GetCurrentThreadId();
DWORD dwFGThread = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
AttachThreadInput(dwCurrentThread, dwFGThread, TRUE);
// Possible actions you may wan to bring the window into focus.
SetForegroundWindow(hwnd);
SetCapture(hwnd);
SetFocus(hwnd);
SetActiveWindow(hwnd);
EnableWindow(hwnd, TRUE);
AttachThreadInput(dwCurrentThread, dwFGThread, FALSE);
sf::Clock clock;
while (!SetForegroundWindow(hwnd) && clock.getElapsedTime().asMilliseconds() < 1000) //try to forcefully set foreground window
{
Sleep(1);
}
}
void SteamTargetRenderer::launchApp()
{
SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
bool launchGame = false;
bool closeWhenDone = false;
QString type = "Win32";
QString path = "";
QString args;
QSettings settings(this->arguments().at(1), QSettings::IniFormat);
settings.beginGroup("LaunchGame");
const QStringList childKeys = settings.childKeys();
for (auto &childkey : childKeys)
{
if (childkey == "bLaunchGame")
launchGame = settings.value(childkey).toBool();
else if (childkey == "Type")
type = settings.value(childkey).toString();
else if (childkey == "Path")
path = settings.value(childkey).toString();
else if (childkey == "Args")
args = settings.value(childkey).toString();
else if (childkey == "bCloseWhenDone")
closeWhenDone = settings.value("bCloseWhenDone").toBool();
}
settings.endGroup();
if (launchGame)
{
QSharedMemory sharedMemInstance("GloSC_GameLauncher");
if (!sharedMemInstance.create(1024) && sharedMemInstance.error() == QSharedMemory::AlreadyExists)
{
if (type == "UWP")
{
HWND hwnd = sfWindow.getSystemHandle();
SetWindowPos(hwnd, HWND_BOTTOM, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_ASYNCWINDOWPOS);
QTimer::singleShot(5000, [hwnd]()
{
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_ASYNCWINDOWPOS);
});
}
QBuffer buffer;
QDataStream dataStream(&buffer);
QStringList stringList;
sharedMemInstance.attach();
sharedMemInstance.lock();
buffer.setData(static_cast<const char*>(sharedMemInstance.constData()), sharedMemInstance.size());
buffer.open(QBuffer::ReadOnly);
dataStream >> stringList;
buffer.close();
int lgt_index = stringList.indexOf(LaunchGame);
stringList.replace(lgt_index + 1, type);
stringList.replace(lgt_index + 2, path);
stringList.replace(lgt_index + 3, args);
buffer.open(QBuffer::ReadWrite);
QDataStream out(&buffer);
out << stringList;
int size = buffer.size();
char *to = static_cast<char*>(sharedMemInstance.data());
const char *from = buffer.data().data();
memcpy(to, from, qMin(sharedMemInstance.size(), size));
buffer.close();
sharedMemInstance.unlock();
sharedMemInstance.detach();
if (closeWhenDone)
{
updateTimer.setInterval(1111);
connect(&updateTimer, SIGNAL(timeout()), this, SLOT(checkSharedMem()));
updateTimer.start();
}
}
}
}
void SteamTargetRenderer::checkSharedMem()
{
QSharedMemory sharedMemInstance("GloSC_GameLauncher");
if (!sharedMemInstance.create(1024) && sharedMemInstance.error() == QSharedMemory::AlreadyExists)
{
QBuffer buffer;
QDataStream in(&buffer);
QStringList stringList;
sharedMemInstance.attach();
sharedMemInstance.lock();
buffer.setData(static_cast<const char*>(sharedMemInstance.constData()), sharedMemInstance.size());
buffer.open(QBuffer::ReadOnly);
in >> stringList;
buffer.close();
sharedMemInstance.unlock();
sharedMemInstance.detach();
int close_index = stringList.indexOf(LaunchedProcessFinished) + 1;
if (close_index > 0 && stringList.at(close_index).toInt() == 1)
bRunLoop = false;
}
}

@ -1,128 +0,0 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <Windows.h>
#include <dwmapi.h>
#include <SFML\System.hpp>
#include <SFML\Graphics.hpp>
#include <iostream>
#include <thread>
#include <QApplication>
#include <QTimer>
#include <QProcess>
#include <QBuffer>
#include <QDatastream>
#include <QSharedmemory>
#include <QSettings>
#include <QCoreApplication>
#include <QDir>
#include <psapi.h>
#include "VirtualControllerThread.h"
#include <atomic>
class SteamTargetRenderer : public QApplication
{
Q_OBJECT
public:
SteamTargetRenderer(int& argc, char** argv);
~SteamTargetRenderer();
void run();
private:
void stop();
void getSteamOverlay();
void RunSfWindowLoop();
static void makeSfWindowTransparent(sf::RenderWindow& window);
void drawDebugEdges();
void hookBindings() const;
void loadLogo();
void moveMouseIntoOverlay();
static LRESULT WINAPI HookCallback(int nCode, WPARAM wParam, LPARAM lParam);
static void unhookBindings();
static BOOL WINAPI ConsoleCtrlCallback(_In_ DWORD dwCtrlType);
static void stealFocus(HWND hwnd);
std::atomic<bool> bRunLoop = true;
bool bUseDesktopConfig = false;
bool bDrawDebugEdges = false;
bool bDrawOverlay = true;
bool bVsync = false;
int iRefreshRate = 30;
sf::CircleShape sfCshape;
sf::RenderWindow sfWindow;
std::thread renderThread;
HWND consoleHwnd;
HMODULE hmodGameOverlayRenderer = nullptr;
#ifdef _AMD64_
WCHAR* overlayModuleName = L"GameOverlayRenderer64.dll";
#else
WCHAR* overlayModuleName = L"GameOverlayRenderer.dll";
#endif
static std::atomic<bool> overlayOpen;
static HHOOK hook;
HWND hwForeGroundWindow = nullptr;
bool bNeedFocusSwitch = false;
VirtualControllerThread controllerThread;
bool bEnableControllers = true;
static std::atomic<bool> bHookSteam;
QTimer updateTimer;
std::unique_ptr<sf::Texture> spriteTexture;
sf::Sprite backgroundSprite;
const QString LaunchGame = "LaunchGame";
const QString LaunchedProcessFinished = "LaunchedProcessFinished";
const QString IsSteamHooked = "IsSteamHooked";
const QStringList defaultSharedMemData = QStringList()
<< LaunchGame
<< ""
<< ""
<< LaunchedProcessFinished
<< "0"
<< IsSteamHooked
<< "-1";
private slots:
void launchApp();
void checkSharedMem();
};

@ -0,0 +1,214 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "TargetOverlay.h"
#include <Windows.h>
#include <dwmapi.h>
#include <SFML/Window/Event.hpp>
#include <iostream>
#include "SteamTarget.h"
bool TargetOverlay::init(bool hidden, bool overlay_only_config)
{
const sf::VideoMode mode = sf::VideoMode::getDesktopMode();
window_.create(sf::VideoMode(mode.width - 16, mode.height - 32), "GloSC_OverlayWindow");
//Window is too large ; always 16 and 32 pixels? - sf::Style::None breaks transparency!
window_.setFramerateLimit(30);
window_.setPosition({ 0, 0 });
last_foreground_window_ = window_.getSystemHandle();
makeSfWindowTransparent();
hidden_ = hidden;
hidden_only_config_ = overlay_only_config;
if (window_.setActive(false))
{
overlay_thread_ = std::thread(&TargetOverlay::overlayLoop, this);
return true;
}
return false;
}
void TargetOverlay::stop()
{
run_ = false;
overlay_thread_.join();
}
void TargetOverlay::overlayLoop()
{
if (window_.setActive(true))
{
loadLogo();
if (hidden_ || hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_HIDE);
if (hidden_)
window_.setFramerateLimit(1); //Window is not shown anyway,
}
else
{
SetWindowPos(window_.getSystemHandle(), HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE | SWP_ASYNCWINDOWPOS);
}
while (window_.isOpen() && run_)
{
sf::Event event{};
while (window_.pollEvent(event))
{
if (event.type == sf::Event::Closed)
{
window_.close();
SteamTarget::quit();
}
}
if (overlay_state_ == 1)
{
if (hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_SHOW);
}
last_foreground_window_ = GetForegroundWindow();
std::cout << "Saving current ForegorundWindow HWND: " << last_foreground_window_ << std::endl;
std::cout << "Activating OverlayWindow" << std::endl;
SetWindowLong(window_.getSystemHandle(), GWL_EXSTYLE, WS_EX_LAYERED); //make overlay window clickable
//Actually activate the overlaywindow
stealFocus(window_.getSystemHandle());
//Move the mouse cursor inside the overlaywindow
//this is neccessary because steam doesn't want to switch to big picture bindings if mouse isn't inside
moveMouseIntoOverlay();
overlay_state_ = 0;
draw_logo_ = true;
} else if (overlay_state_ == 2)
{
//make overlaywindow clickthrough - WS_EX_TRANSPARENT - again
SetWindowLong(window_.getSystemHandle(), GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT);
std::cout << "Switching to previously focused window" << std::endl;
//switch back the the previosly focused window
stealFocus(last_foreground_window_);
overlay_state_ = 0;
draw_logo_ = false;
if (hidden_only_config_)
{
ShowWindow(window_.getSystemHandle(), SW_HIDE);
}
}
window_.clear(sf::Color::Transparent);
if (draw_logo_)
window_.draw(background_sprite_);
window_.display();
}
}
}
void TargetOverlay::onOverlayOpened()
{
overlay_state_ = 1;
}
void TargetOverlay::onOverlayClosed()
{
overlay_state_ = 2;
}
void TargetOverlay::stealFocus(HWND hwnd)
{
const DWORD dwCurrentThread = GetCurrentThreadId();
const DWORD dwFGThread = GetWindowThreadProcessId(GetForegroundWindow(), nullptr);
AttachThreadInput(dwCurrentThread, dwFGThread, TRUE);
// Possible actions you may wan to bring the window into focus.
SetForegroundWindow(hwnd);
SetCapture(hwnd);
SetFocus(hwnd);
SetActiveWindow(hwnd);
EnableWindow(hwnd, TRUE);
AttachThreadInput(dwCurrentThread, dwFGThread, FALSE);
sf::Clock clock;
while (!SetForegroundWindow(hwnd) && clock.getElapsedTime().asMilliseconds() < 1000) //try to forcefully set foreground window
{
Sleep(1);
}
}
void TargetOverlay::makeSfWindowTransparent()
{
HWND hwnd = window_.getSystemHandle();
SetWindowLong(hwnd, GWL_STYLE, WS_VISIBLE | WS_POPUP &~ WS_CAPTION);
SetWindowLong(hwnd, GWL_EXSTYLE, WS_EX_LAYERED | WS_EX_TRANSPARENT | WS_EX_TOPMOST);
MARGINS margins;
margins.cxLeftWidth = -1;
DwmExtendFrameIntoClientArea(hwnd, &margins);
SetWindowPos(hwnd, HWND_TOPMOST, 0, 0, 0, 0, SWP_FRAMECHANGED | SWP_NOMOVE | SWP_NOSIZE);
window_.clear(sf::Color::Transparent);
window_.display();
}
void TargetOverlay::moveMouseIntoOverlay() const
{
RECT rect = { 0,0,0,0 };
if (GetWindowRect(window_.getSystemHandle(), &rect))
{
POINT cursor_pos = { 0,0 };
GetCursorPos(&cursor_pos);
if (PtInRect(&rect, cursor_pos))
{
SetCursorPos(cursor_pos.x + 1, cursor_pos.y);
}
else
{
SetCursorPos(rect.left + 16, rect.top + 16);
}
}
}
void TargetOverlay::loadLogo()
{
HRSRC rsrcData = FindResource(NULL, L"ICOPNG", RT_RCDATA);
DWORD rsrcDataSize = SizeofResource(NULL, rsrcData);
HGLOBAL grsrcData = LoadResource(NULL, rsrcData);
LPVOID firstByte = LockResource(grsrcData);
sprite_texture_ = std::make_unique<sf::Texture>();
sprite_texture_->loadFromMemory(firstByte, rsrcDataSize);
background_sprite_.setTexture(*sprite_texture_);
background_sprite_.setOrigin(sf::Vector2f(sprite_texture_->getSize().x / 2.f, sprite_texture_->getSize().y / 2));
sf::VideoMode winSize = sf::VideoMode::getDesktopMode();
background_sprite_.setPosition(sf::Vector2f(winSize.width / 2.f, winSize.height / 2.f));
}

@ -0,0 +1,72 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <SFML/Graphics/RenderWindow.hpp>
#include <SFML/Graphics/Sprite.hpp>
#include <SFML/Graphics/Texture.hpp>
#include <thread>
#include <windows.h>
#include <atomic>
class TargetOverlay
{
public:
TargetOverlay() = default;
TargetOverlay(const TargetOverlay& other) = delete;
TargetOverlay(TargetOverlay&& other) noexcept = delete;
TargetOverlay& operator=(const TargetOverlay& other) = delete;
TargetOverlay& operator=(TargetOverlay&& other) noexcept = delete;
~TargetOverlay() = default;
bool init(bool hidden = false, bool overlay_only_config = false);
void stop();
void overlayLoop();
void onOverlayOpened();
void onOverlayClosed();
private:
static void stealFocus(HWND hwnd);
void makeSfWindowTransparent();
void moveMouseIntoOverlay() const;
void loadLogo();
std::unique_ptr<sf::Texture> sprite_texture_;
sf::Sprite background_sprite_;
bool draw_logo_ = false;
std::thread overlay_thread_;
sf::RenderWindow window_;
bool run_ = true;
bool hidden_ = false;
bool hidden_only_config_ = false;
//Cannot have too much logic inside of overlayOpened / closed callbacks
//Otherwise stuff breaks
//0 = no change
//1 = opened
//2 = closed
std::atomic<char> overlay_state_ = 0;
HWND last_foreground_window_{};
};

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -14,74 +14,76 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
#include "VirtualControllerThread.h"
//
VirtualControllerThread::VirtualControllerThread()
#include "../common/loguru.hpp"
VirtualControllerThread::VirtualControllerThread(const int delay)
{
driver = vigem_alloc();
driver_ = vigem_alloc();
if (!VIGEM_SUCCESS(vigem_connect(driver)))
if (!VIGEM_SUCCESS(vigem_connect(driver_)))
{
std::cout << "Error initializing ViGem!" << std::endl;
LOG_F(ERROR, "initializing ViGem!");
MessageBoxW(NULL, L"Error initializing ViGem!", L"GloSC-SteamTarget", MB_OK);
bShouldRun = false;
b_should_run_ = false;
}
for (int i = 0; i < XUSER_MAX_COUNT; i++)
for (auto & target : vt_x360_)
{
vtX360[i] = vigem_target_x360_alloc();
target = vigem_target_x360_alloc();
}
seven = IsWindows7OrGreater() != IsWindows8OrGreater();
seven_ = IsWindows7OrGreater() != IsWindows8OrGreater();
delay_ = delay;
}
VirtualControllerThread::~VirtualControllerThread()
{
if (controllerThread.joinable())
controllerThread.join();
vigem_disconnect(driver);
if (controller_thread_.joinable())
controller_thread_.join();
vigem_disconnect(driver_);
}
void VirtualControllerThread::run()
{
bShouldRun = true;
controllerThread = std::thread(&VirtualControllerThread::controllerLoop, this);
b_should_run_ = true;
controller_thread_ = std::thread(&VirtualControllerThread::controllerLoop, this);
}
void VirtualControllerThread::stop()
{
bShouldRun = false;
for (int i = 0; i < XUSER_MAX_COUNT; i++)
b_should_run_ = false;
for (auto & target : vt_x360_)
{
vigem_target_remove(driver, vtX360[i]);
vigem_target_remove(driver_, target);
}
}
bool VirtualControllerThread::isRunning()
bool VirtualControllerThread::isRunning() const
{
return bShouldRun;
return b_should_run_;
}
void VirtualControllerThread::controllerLoop()
{
DWORD result;
DWORD result2;
sf::Clock waitForHookTimer;
while (bShouldRun)
while (b_should_run_)
{
sfClock.restart();
sf_clock_.restart();
// We have to retrieve the XInputGetState function by loading it via GetProcAdress
// otherwise the M$ compiler calls to a jumptable, jumping to the real function
// otherwise we get calls to a jumptable, jumping to the real function
// We can't have this if we wan't to dynamically unpatch and repatch Valve's XInput hook
// Also wait a second, jut to be sure Steam has done it's hooking thing...
if (XGetState == nullptr && waitForHookTimer.getElapsedTime().asSeconds() > 1)
if (x_get_state_ == nullptr && waitForHookTimer.getElapsedTime().asSeconds() > 1)
{
HMODULE xinputmod = nullptr;
HANDLE hProcess = GetCurrentProcess();
const HANDLE hProcess = GetCurrentProcess();
HMODULE hMods[1024];
DWORD cbNeeded;
EnumProcessModules(hProcess, hMods, sizeof(hMods), &cbNeeded);
@ -103,31 +105,33 @@ void VirtualControllerThread::controllerLoop()
}
}
XInputGetState_t realXgstate = reinterpret_cast<XInputGetState_t>(GetProcAddress(xinputmod, "XInputGetState"));
const XInputGetState_t realXgstate = reinterpret_cast<XInputGetState_t>(GetProcAddress(xinputmod, "XInputGetState"));
std::cout << "realXgstate: " << std::hex << realXgstate << "\n";
//std::cout << "realXgstate: " << std::hex << realXgstate << "\n";
for (int i = 0; i < 5; i++)
{
valveHookBytes[i] = *reinterpret_cast<uint8_t*>(reinterpret_cast<uint64_t>(*realXgstate) + i);
valve_hook_bytes_[i] = *reinterpret_cast<uint8_t*>(reinterpret_cast<uint64_t>(*realXgstate) + i);
}
XGetState = realXgstate;
controllerCount = 1;
x_get_state_ = realXgstate;
controller_count_ = 1;
}
if (XGetState != nullptr)
if (x_get_state_ != nullptr)
{
for (int i = 0; i < XUSER_MAX_COUNT; i++)
{
////////
//Call the hooked, as well as the 'real' XInputGetState function to determine if a controller is real of 'fake' (from Steam)
XINPUT_STATE state = { 0 };
result = XInputGetStateWrapper(i, &state);
const DWORD result = XInputGetStateWrapper(i, &state);
XINPUT_STATE state2 = { 0 };
result2 = callRealXinputGetState(i, &state2);
const DWORD result2 = callRealXinputGetState(i, &state2);
if (result == ERROR_SUCCESS)
{
if ( (result2 != ERROR_SUCCESS) == seven )
if ( (result2 != ERROR_SUCCESS) == seven_ ) //for whatever reason, the second call also returns true on win7, false (as it should(?)) otherwise.
{
// By using VID and PID of Valve's SteamController, Steam doesn't give us ANOTHER "fake" XInput device
// Leading to endless pain and suffering.
@ -135,38 +139,40 @@ void VirtualControllerThread::controllerLoop()
// Also annoying the shit out of the user when they open the overlay as steam prompts to setup new XInput devices
// Also avoiding any fake inputs from Valve's default controllerprofile
// -> Leading to endless pain and suffering
vigem_target_set_vid(vtX360[i], 0x28de); //Valve SteamController VID
vigem_target_set_pid(vtX360[i], 0x1102); //Valve SteamController PID
vigem_target_set_vid(vt_x360_[i], 0x28de); //Valve SteamController VID
vigem_target_set_pid(vt_x360_[i], 0x1102); //Valve SteamController PID
int vigem_res = vigem_target_add(driver, vtX360[i]);
const int vigem_res = vigem_target_add(driver_, vt_x360_[i]);
if (vigem_res == VIGEM_ERROR_TARGET_UNINITIALIZED)
{
vtX360[i] = vigem_target_x360_alloc();
vt_x360_[i] = vigem_target_x360_alloc();
}
if (vigem_res == VIGEM_ERROR_NONE)
{
std::cout << "Plugged in controller " << vigem_target_get_index(vtX360[i]) << std::endl;
vigem_target_x360_register_notification(driver, vtX360[i], reinterpret_cast<PVIGEM_X360_NOTIFICATION>(&VirtualControllerThread::controllerCallback));
LOG_F(INFO, "Plugged in controller %d", vigem_target_get_index(vt_x360_[i]));
vigem_target_x360_register_notification(driver_, vt_x360_[i],
reinterpret_cast<PVIGEM_X360_NOTIFICATION>(&VirtualControllerThread::
controllerCallback));
}
}
if (vtX360[i] != nullptr)
vigem_target_x360_update(driver, vtX360[i], *reinterpret_cast<XUSB_REPORT*>(&state.Gamepad));
if (vt_x360_[i] != nullptr)
vigem_target_x360_update(driver_, vt_x360_[i], *reinterpret_cast<XUSB_REPORT*>(&state.Gamepad));
}
else
{
if (VIGEM_SUCCESS(vigem_target_remove(driver, vtX360[i])))
if (VIGEM_SUCCESS(vigem_target_remove(driver_, vt_x360_[i])))
{
std::cout << "Unplugged controller " << vigem_target_get_index(vtX360[i]) << std::endl;
LOG_F(INFO, "Unplugged controller %d", vigem_target_get_index(vt_x360_[i]));
}
}
}
}
tickTime = sfClock.getElapsedTime().asMicroseconds();
if (tickTime < delay)
tick_time_ = sf_clock_.getElapsedTime().asMicroseconds();
if (tick_time_ < delay_)
{
std::this_thread::sleep_for(std::chrono::microseconds(delay - tickTime));
std::this_thread::sleep_for(std::chrono::microseconds(delay_ - tick_time_));
}
}
@ -189,23 +195,22 @@ DWORD VirtualControllerThread::XInputGetStateWrapper(DWORD dwUserIndex, XINPUT_S
DWORD VirtualControllerThread::callRealXinputGetState(DWORD dwUserIndex, XINPUT_STATE* pState)
{
DWORD ret;
DWORD dwOldProtect, dwBkup;
BYTE* Address = reinterpret_cast<BYTE*>(XGetState);
VirtualProtect(Address, opPatchLenght, PAGE_EXECUTE_READWRITE, &dwOldProtect); //Change permissions of memory..
for (DWORD i = 0; i < opPatchLenght; i++) //unpatch Valve's hook
auto* Address = reinterpret_cast<BYTE*>(x_get_state_);
VirtualProtect(Address, op_patch_lenght, PAGE_EXECUTE_READWRITE, &dwOldProtect); //Change permissions of memory..
for (DWORD i = 0; i < op_patch_lenght; i++) //unpatch Valve's hook
{
*(Address + i) = realBytes[i];
*(Address + i) = real_bytes[i];
}
ret = XGetState(dwUserIndex, pState); //Cal REAL XInputGetState...
const DWORD ret = x_get_state_(dwUserIndex, pState); //Cal REAL XInputGetState...
for (int i = 0; i < opPatchLenght; i++) //repatch Valve's hook
for (int i = 0; i < op_patch_lenght; i++) //repatch Valve's hook
{
*(Address + i) = valveHookBytes[i];
*(Address + i) = valve_hook_bytes_[i];
}
VirtualProtect(Address, opPatchLenght, dwOldProtect, &dwBkup); //Revert permission change...
VirtualProtect(Address, op_patch_lenght, dwOldProtect, &dwBkup); //Revert permission change...
return ret;
}

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -22,7 +22,7 @@ limitations under the License.
#include <vector>
#include <Windows.h>
#include <psapi.h>
#include <Psapi.h>
#include <SFML/System.hpp>
@ -33,48 +33,50 @@ limitations under the License.
class VirtualControllerThread
{
public:
VirtualControllerThread();
explicit VirtualControllerThread(int delay);
VirtualControllerThread(const VirtualControllerThread& other) = delete;
VirtualControllerThread(VirtualControllerThread&& other) noexcept = delete;
VirtualControllerThread& operator=(const VirtualControllerThread& other) = delete;
VirtualControllerThread& operator=(VirtualControllerThread&& other) noexcept = delete;
~VirtualControllerThread();
void run();
void stop();
bool isRunning();
bool isRunning() const;
private:
std::atomic<bool> bShouldRun = false;
std::atomic<bool> b_should_run_ = false;
typedef DWORD(WINAPI* XInputGetState_t)(DWORD dwUserIndex, XINPUT_STATE* pState);
static const uint8_t opPatchLenght = 5;
uint8_t valveHookBytes[5];
static const uint8_t op_patch_lenght = 5;
uint8_t valve_hook_bytes_[5]{};
bool seven = false;
bool seven_ = false;
#ifdef _AMD64_
const uint8_t realBytes[5] = {0x48, 0x89, 0x5C, 0x24, 0x08};
static constexpr const uint8_t realBytes[5] = {0x48, 0x89, 0x5C, 0x24, 0x08};
#else
const uint8_t realBytes[5] = { 0x8B, 0xFF, 0x55, 0x8B, 0xEC };
static constexpr const uint8_t real_bytes[5] = { 0x8B, 0xFF, 0x55, 0x8B, 0xEC };
#endif
//uint8_t realBytes[5] = { 0xDE, 0xAD, 0xBE, 0xEF, 0x90 };
int controllerCount = 0;
XInputGetState_t XGetState = nullptr;
int controller_count_ = 0;
XInputGetState_t x_get_state_ = nullptr;
PVIGEM_CLIENT driver;
PVIGEM_TARGET vtX360[XUSER_MAX_COUNT];
PVIGEM_CLIENT driver_;
PVIGEM_TARGET vt_x360_[XUSER_MAX_COUNT]{};
std::thread controllerThread;
std::thread controller_thread_;
sf::Clock sfClock;
int tickTime = 0;
int delay = 1000000 / 200;
sf::Clock sf_clock_;
int tick_time_ = 0;
int delay_ = 0;
void controllerLoop();
static void controllerCallback(PVIGEM_CLIENT client, PVIGEM_TARGET Target, UCHAR LargeMotor, UCHAR SmallMotor, UCHAR LedNumber);
static void __RPC_CALLEE controllerCallback(PVIGEM_CLIENT client, PVIGEM_TARGET Target, UCHAR LargeMotor, UCHAR SmallMotor, UCHAR LedNumber);
static DWORD XInputGetStateWrapper(DWORD dwUserIndex, XINPUT_STATE* pState); //Easier to find in x64dbg...

@ -1,5 +1,5 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -13,13 +13,19 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "SteamTargetRenderer.h"
#include <QtCore/QCoreApplication>
#include <Windows.h>
#include "SteamTarget.h"
int main(int argc, char *argv[])
int CALLBACK WinMain(
_In_ HINSTANCE hInstance,
_In_ HINSTANCE hPrevInstance,
_In_ LPSTR lpCmdLine,
_In_ int nCmdShow
)
{
SteamTargetRenderer renderer(argc, argv);
renderer.run();
return renderer.exec();
SteamTarget target(__argc, __argv);
target.init();
return SteamTarget::exec();
}

@ -1,10 +1,12 @@
[BaseConf]
bDrawDebugEdges=0
bEnableOverlay=1
bEnableOverlayOnlyConfig=0
bEnableControllers=1
bUseDesktopConfig=0
bHookSteam=1
version=320
iUpdateRate=5000
version=1298
[LaunchGame]
bLaunchGame=0

@ -0,0 +1,268 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "Injector.h"
#include <tlhelp32.h>
#include <iostream>
#include "../common/loguru.hpp"
void Injector::TakeDebugPrivilege()
{
HANDLE hProcess = GetCurrentProcess(), hToken;
TOKEN_PRIVILEGES priv;
LUID luid = { NULL };
OpenProcessToken(hProcess, TOKEN_ADJUST_PRIVILEGES | TOKEN_QUERY, &hToken);
LookupPrivilegeValue(0, SE_DEBUG_NAME, &luid);
priv.PrivilegeCount = 1;
priv.Privileges[0].Luid = luid;
priv.Privileges[0].Attributes = SE_PRIVILEGE_ENABLED;
AdjustTokenPrivileges(hToken, false, &priv, sizeof(priv), NULL, NULL);
CloseHandle(hToken);
CloseHandle(hProcess);
}
int Injector::Inject(DWORD pid, std::wstring &libPath)
{
HANDLE hProcess = NULL, allocAddress = NULL, hRemoteThread = NULL;
LPTHREAD_START_ROUTINE pfnThreadRtn = NULL;
size_t pathSize = (libPath.length() + 1) * sizeof(wchar_t);
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION | PROCESS_VM_WRITE, false, pid);
if (!hProcess)
{
return 1;
}
allocAddress = VirtualAllocEx(hProcess, NULL, pathSize, MEM_COMMIT, PAGE_READWRITE);
if (!allocAddress)
{
CloseHandle(hProcess);
return 2;
}
if (!WriteProcessMemory(hProcess, (LPVOID)allocAddress, libPath.c_str(), pathSize, NULL))
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 3;
}
pfnThreadRtn = reinterpret_cast<PTHREAD_START_ROUTINE>(GetProcAddress(GetModuleHandle(L"Kernel32"), "LoadLibraryW"));
if (!pfnThreadRtn)
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 4;
}
hRemoteThread = CreateRemoteThread(hProcess, NULL, 0, pfnThreadRtn, allocAddress, 0, NULL);
if (!hRemoteThread)
{
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 5;
}
WaitForSingleObject(hRemoteThread, INFINITE);
CloseHandle(hRemoteThread);
VirtualFreeEx(hProcess, allocAddress, pathSize, MEM_DECOMMIT);
CloseHandle(hProcess);
return 0;
}
int Injector::Eject(DWORD pid, std::wstring &libPath)
{
HANDLE hProcess = NULL, hRemoteThread = NULL;
HMODULE hLibMod = NULL;
LPTHREAD_START_ROUTINE pfnThreadRtn = NULL;
if (!findModule(pid, libPath, hLibMod))
{
return 2;
}
hProcess = OpenProcess(PROCESS_QUERY_INFORMATION | PROCESS_CREATE_THREAD | PROCESS_VM_OPERATION, false, pid);
if (!hProcess)
{
return 1;
}
pfnThreadRtn = (PTHREAD_START_ROUTINE)GetProcAddress(GetModuleHandle(L"Kernel32"), "FreeLibrary");
if (!pfnThreadRtn)
{
CloseHandle(hProcess);
return 3;
}
hRemoteThread = CreateRemoteThread(hProcess, NULL, NULL, pfnThreadRtn, hLibMod, NULL, NULL);
if (!hRemoteThread)
return 4;
WaitForSingleObject(hRemoteThread, INFINITE);
CloseHandle(hProcess);
return 0;
}
bool Injector::findModule(DWORD pid, std::wstring &libPath, HMODULE &hMod)
{
MODULEENTRY32W entry = { sizeof(entry) };
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPMODULE, pid);
if (Module32FirstW(snapshot, &entry) == TRUE)
{
while (Module32NextW(snapshot, &entry) == TRUE)
{
std::wstring ModuleName(entry.szModule);
std::wstring ExePath(entry.szExePath);
if (ModuleName == libPath || ExePath == libPath)
{
hMod = (HMODULE)entry.modBaseAddr;
CloseHandle(snapshot);
return true;
}
}
}
CloseHandle(snapshot);
return false;
}
int Injector::hookSteam()
{
Injector::TakeDebugPrivilege();
wchar_t wcPath[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), wcPath, MAX_PATH);
std::wstring path(wcPath);
std::wstring libPath = path.substr(0, 1 + path.find_last_of(L'\\')) + L"EnforceBindingDLL.dll";
DWORD pid = NULL;
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (Process32First(snapshot, &entry) == TRUE)
{
while (Process32Next(snapshot, &entry) == TRUE)
{
if (_wcsicmp(entry.szExeFile, L"steam.exe") == 0)
{
pid = entry.th32ProcessID;
}
}
}
CloseHandle(snapshot);
if (pid == NULL)
{
LOG_F(WARNING, "Can't detect Steam.exe running");
return 0;
}
const int result = Injector::Inject(pid, libPath);
switch (result)
{
case 0:
LOG_F(INFO, "Inject success!");
return 1;
case 1:
LOG_F(ERROR, "Couldn't open process");
break;
case 2:
LOG_F(ERROR, "Couldn't allocate memory");
break;
case 3:
LOG_F(ERROR, "Couldn't write memory");
break;
case 4:
LOG_F(ERROR, "Couldn't get pointer ro LoadLibraryW");
break;
case 5:
LOG_F(ERROR, "Couldn't start remote thread");
break;
default:
return 0;
}
}
int Injector::unhookSteam()
{
Injector::TakeDebugPrivilege();
wchar_t wcPath[MAX_PATH];
GetModuleFileName(GetModuleHandle(NULL), wcPath, MAX_PATH);
std::wstring path(wcPath);
std::wstring libPath = path.substr(0, 1 + path.find_last_of(L'\\')) + L"EnforceBindingDLL.dll";
DWORD pid = NULL;
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
const HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (Process32First(snapshot, &entry) == TRUE)
{
while (Process32Next(snapshot, &entry) == TRUE)
{
if (_wcsicmp(entry.szExeFile, L"steam.exe") == 0)
{
pid = entry.th32ProcessID;
}
}
}
CloseHandle(snapshot);
if (pid == NULL)
{
LOG_F(WARNING, "Can't detect Steam.exe running");
return 0;
}
const int result = Injector::Eject(pid, libPath);
switch (result)
{
case 0:
LOG_F(INFO, "Eject success!");
return 1;
case 1:
LOG_F(ERROR, "Couldn't open process");
break;
case 2:
LOG_F(ERROR, "Couldn't find module in process");
break;
case 3:
LOG_F(ERROR, "Couldn't get pointer ro FreeLibrary");
break;
case 4:
LOG_F(ERROR, "Couldn't start remote thread");
break;
default:
return 0;
}
}

@ -1,11 +1,11 @@
/*
Copyright 2016 Peter Repukat - FlatspotSoftware
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http ://www.apache.org/licenses/LICENSE-2.0
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
@ -13,16 +13,25 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#include "GloSC_GameLauncher.h"
#include <QtWidgets/QApplication>
#pragma once
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
GloSC_GameLauncher w;
w.show();
#include <Windows.h>
#include <string>
QObject::connect(&a, SIGNAL(aboutToQuit()), &w, SLOT(isAboutToBeKilled()));
class Injector {
return a.exec();
}
public:
static void TakeDebugPrivilege();
static int Inject(DWORD pid, std::wstring &libPath);
static int Eject(DWORD pid, std::wstring &libPath);
static int hookSteam();
static int unhookSteam();
private:
static bool findModule(DWORD pid, std::wstring &libPath, HMODULE &hMod);
};

@ -0,0 +1,89 @@
/*
Copyright 2018 Peter Repukat - FlatspotSoftware
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
#pragma once
#include <Windows.h>
#include <Psapi.h>
namespace hook_commons
{
//places a jmp instruction to a __declspec(naked) function on a given adress
//nops the rest of bytes to don't break any instructions
//part of patched code may has to be executed in the hook function
void PlaceJMP(BYTE * Address, DWORD jumpTo, DWORD lenght)
{
DWORD dwOldProtect, dwBkup, dwReloadAddr;
VirtualProtect(Address, lenght, PAGE_EXECUTE_READWRITE, &dwOldProtect);
dwReloadAddr = (jumpTo - (DWORD)Address) - 5; //5 == lenght of jump instruction (1byte + 4byte address)
*Address = 0xE9; //jmp instrcution
*((DWORD*)(Address + 0x1)) = dwReloadAddr;
for (DWORD x = 5; x < lenght; x++)
*(Address + x) = 0x90; //nop the rest
VirtualProtect(Address, lenght, dwOldProtect, &dwBkup);
}
void RestoreBytes(BYTE * Address, BYTE * original, DWORD lenght)
{
DWORD dwOldProtect, dwBkup, dwReloadAddr;
VirtualProtect(Address, lenght, PAGE_EXECUTE_READWRITE, &dwOldProtect);
for (DWORD x = 0; x < lenght; x++)
{
*(Address + x) = *(original + x);
}
VirtualProtect(Address, lenght, dwOldProtect, &dwBkup);
}
MODULEINFO GetModInfo(const char * szModule)
{
MODULEINFO ret = { NULL };
HMODULE mod = GetModuleHandleA(szModule);
if (mod != 0)
GetModuleInformation(GetCurrentProcess(), mod, &ret, sizeof(MODULEINFO));
return ret;
}
//returns memory address of given pattern ind given module
DWORD FindPattern(const char * module, const char * pattern, const char * mask)
{
MODULEINFO mInfo = GetModInfo(module);
DWORD baseAddr = (DWORD)mInfo.lpBaseOfDll;
if (baseAddr == 0)
return NULL;
DWORD size = mInfo.SizeOfImage;
DWORD patLenght = strlen(mask);
for (DWORD i = 0; i < size - patLenght; i++) //bad for loop btw...
{
bool found = true;
for (DWORD j = 0; j < patLenght; j++)
found &= mask[j] == '?' || pattern[j] == *(char*)(baseAddr + j + i);
if (found)
return baseAddr + i;
}
return NULL;
}
}

File diff suppressed because it is too large Load Diff

@ -0,0 +1,38 @@
#pragma once
#include <Windows.h>
#include <tlhelp32.h>
namespace process_alive
{
//stolen from: https://stackoverflow.com/questions/1591342/c-how-to-determine-if-a-windows-process-is-running
inline bool IsProcessRunning(const wchar_t *processName)
{
bool exists = false;
PROCESSENTRY32 entry;
entry.dwSize = sizeof(PROCESSENTRY32);
const HANDLE snapshot = CreateToolhelp32Snapshot(TH32CS_SNAPPROCESS, NULL);
if (Process32First(snapshot, &entry))
do {
if (!_wcsicmp(entry.szExeFile, processName))
{
exists = true;
break;
}
} while (Process32Next(snapshot, &entry));
CloseHandle(snapshot);
return exists;
}
inline BOOL IsProcessRunning(DWORD pid)
{
const HANDLE process = OpenProcess(SYNCHRONIZE, FALSE, pid);
if (process == nullptr)
return false;
const DWORD ret = WaitForSingleObject(process, 0);
CloseHandle(process);
return ret == WAIT_TIMEOUT;
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -7,17 +7,12 @@ Break
Return
}
if (get-module | Where-Object {$_.Name -eq "ViGEmManagementModule"})
if (!(Get-Module -Listavailable -Name "ViGEmManagementModule"))
{
$res = Get-ViGEmBusDevice
if ($res -ne $null)
{
Get-ViGEmBusDevice | Remove-ViGEmBusDevice
}
} else {
Register-PSRepository -Name nuget.vigem.org -SourceLocation https://nuget.vigem.org/ -InstallationPolicy Trusted -force
Register-PSRepository -Name nuget.vigem.org -SourceLocation https://nuget.vigem.org/ -InstallationPolicy Trusted
Install-Module ViGEmManagementModule -Repository nuget.vigem.org
}
Install-Module ViGEmManagementModule -Repository nuget.vigem.org
Install-ViGEmBusDeviceDriver
Add-ViGEmBusDevice
Get-ViGEmBusDevice | Remove-ViGEmBusDevice
Add-ViGEmBusDevice
Install-ViGEmBusDeviceDriver

@ -0,0 +1,126 @@
LICENSE ISSUES
==============
The OpenSSL toolkit stays under a dual license, i.e. both the conditions of
the OpenSSL License and the original SSLeay license apply to the toolkit.
See below for the actual license texts. Actually both licenses are BSD-style
Open Source licenses. In case of any license issues related to OpenSSL
please contact openssl-core@openssl.org.
OpenSSL License
---------------
/* ====================================================================
* Copyright (c) 1998-2016 The OpenSSL Project. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in
* the documentation and/or other materials provided with the
* distribution.
*
* 3. All advertising materials mentioning features or use of this
* software must display the following acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit. (http://www.openssl.org/)"
*
* 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
* endorse or promote products derived from this software without
* prior written permission. For written permission, please contact
* openssl-core@openssl.org.
*
* 5. Products derived from this software may not be called "OpenSSL"
* nor may "OpenSSL" appear in their names without prior written
* permission of the OpenSSL Project.
*
* 6. Redistributions of any form whatsoever must retain the following
* acknowledgment:
* "This product includes software developed by the OpenSSL Project
* for use in the OpenSSL Toolkit (http://www.openssl.org/)"
*
* THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
* EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
* ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
* NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
* OF THE POSSIBILITY OF SUCH DAMAGE.
* ====================================================================
*
* This product includes cryptographic software written by Eric Young
* (eay@cryptsoft.com). This product includes software written by Tim
* Hudson (tjh@cryptsoft.com).
*
*/
Original SSLeay License
-----------------------
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
* This package is an SSL implementation written
* by Eric Young (eay@cryptsoft.com).
* The implementation was written so as to conform with Netscapes SSL.
*
* This library is free for commercial and non-commercial use as long as
* the following conditions are aheared to. The following conditions
* apply to all code found in this distribution, be it the RC4, RSA,
* lhash, DES, etc., code; not just the SSL code. The SSL documentation
* included with this distribution is covered by the same copyright terms
* except that the holder is Tim Hudson (tjh@cryptsoft.com).
*
* Copyright remains Eric Young's, and as such any Copyright notices in
* the code are not to be removed.
* If this package is used in a product, Eric Young should be given attribution
* as the author of the parts of the library used.
* This can be in the form of a textual message at program startup or
* in documentation (online or textual) provided with the package.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. All advertising materials mentioning features or use of this software
* must display the following acknowledgement:
* "This product includes cryptographic software written by
* Eric Young (eay@cryptsoft.com)"
* The word 'cryptographic' can be left out if the rouines from the library
* being used are not cryptographic related :-).
* 4. If you include any Windows specific code (or a derivative thereof) from
* the apps directory (application code) you must include an acknowledgement:
* "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
*
* THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* The licence and distribution terms for any publically available version or
* derivative of this code cannot be changed. i.e. this code cannot simply be
* copied and put under another distribution licence
* [including the GNU Public Licence.]
*/

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save