Merge branch 'develop'

pull/175/head 0.0.8.0
Peter Repukat 2 years ago
commit 8f534683c8

@ -21,7 +21,7 @@ foreach ($app in $installedapps) {
}
#filter more apps with improper naming patterns; games generally have the appropriate field in their manifests filled out.
if ($name -like "MicrosoftWindows.*" -or $name -like "Microsoft.*" -or $name -like "Windows.*" -or $name -like "Windows Web*") { break; }
if ($name -like "MicrosoftWindows.*" -or $name -like "Windows.*" -or $name -like "Windows Web*") { break; }
$installDir = $app.InstallLocation;
#filter out system apps and apps installed by Microsoft as part of Windows

@ -34,12 +34,12 @@
<QtModules>quick qml</QtModules>
<QtBuildConfig>debug</QtBuildConfig>
<QtQMLDebugEnable>true</QtQMLDebugEnable>
<QtInstall>6.2.4_msvc2019_64</QtInstall>
<QtInstall>6.3.1_msvc2019_64</QtInstall>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'" Label="QtSettings">
<QtModules>quick qml</QtModules>
<QtBuildConfig>release</QtBuildConfig>
<QtInstall>6.2.4_msvc2019_64</QtInstall>
<QtInstall>6.3.1_msvc2019_64</QtInstall>
</PropertyGroup>
<Target Name="QtMsBuildNotFound" BeforeTargets="CustomBuild;ClCompile" Condition="!Exists('$(QtMsBuild)\qt.targets') or !Exists('$(QtMsBuild)\qt.props')">
<Message Importance="High" Text="QtMsBuild: could not locate qt.targets, qt.props; project may not build correctly." />
@ -87,7 +87,7 @@
<ClCompile>
<LanguageStandard>stdcpp17</LanguageStandard>
<AdditionalUsingDirectories>%(AdditionalUsingDirectories)</AdditionalUsingDirectories>
<AdditionalOptions>/Zc:__cplusplus /Zc:zwoPhase- %(AdditionalOptions)</AdditionalOptions>
<AdditionalOptions>/Zc:__cplusplus /Zc:zwoPhase- /permissive- %(AdditionalOptions)</AdditionalOptions>
<CompileAsWinRT>false</CompileAsWinRT>
<PreprocessorDefinitions>NOMINMAX;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AdditionalIncludeDirectories>..\deps\WinReg;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
@ -153,7 +153,6 @@
<ItemGroup>
<ClInclude Include="ExeImageProvider.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="resource1.h" />
<ClInclude Include="UWPFetch.h" />
<ClInclude Include="VDFParser.h" />
<ClInclude Include="WinEventFilter.h" />
@ -165,7 +164,7 @@
<ResourceCompile Include="Resource.rc" />
</ItemGroup>
<ItemGroup>
<Image Include="..\GloSC_Icon.ico" />
<Image Include="$(SolutionDir)\GloSC_Icon.ico" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Condition="Exists('$(QtMsBuild)\qt.targets')">

@ -84,9 +84,6 @@
<ClInclude Include="resource.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="resource1.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="ExeImageProvider.h">
<Filter>Header Files</Filter>
</ClInclude>
@ -102,8 +99,8 @@
</ResourceCompile>
</ItemGroup>
<ItemGroup>
<Image Include="..\GloSC_Icon.ico">
<Filter>Resource Files</Filter>
<Image Include="$(SolutionDir)\GloSC_Icon.ico">
<Filter>Resource Files</Filter>
</Image>
</ItemGroup>
</Project>

Binary file not shown.

@ -1,6 +1,6 @@
// Microsoft Visual C++ generated resource script.
//
#include "resource1.h"
#include "resource.h"
#define APSTUDIO_READONLY_SYMBOLS
/////////////////////////////////////////////////////////////////////////////
@ -27,12 +27,12 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
1 TEXTINCLUDE
BEGIN
"resource1.h\0"
"resource.h\0"
END
2 TEXTINCLUDE
BEGIN
"#include ""winres.h""\r\n"
"#include winres.h\r\n"
"\0"
END
@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,7,004000070037
PRODUCTVERSION 0,0,7,004000070037
FILEVERSION 0,0,7,1021003100876
PRODUCTVERSION 0,0,7,1021003100876
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - Config"
VALUE "FileVersion", "0.0.7.0-4-gcf7ad37"
VALUE "FileVersion", "0.0.7.1-21-g31ee876"
VALUE "InternalName", "GlosSIConfig"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSIConfig.exe"
VALUE "ProductName", "GlosSi"
VALUE "ProductVersion", "0.0.7.0-4-gcf7ad37"
VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.7.1-21-g31ee876"
END
END
BLOCK "VarFileInfo"
@ -91,7 +91,7 @@ END
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
IDI_ICON1 ICON "D:\\Alia5\\Documents\\Visual_Studio_Projects\\GlosSI\\GloSC_Icon.ico"
IDI_ICON1 ICON "..\GloSC_Icon.ico"
#endif // English (United States) resources
/////////////////////////////////////////////////////////////////////////////
@ -124,3 +124,207 @@ IDI_ICON1 ICON "D:\\Alia5\\Documents\\Visual_St

@ -39,7 +39,7 @@ UIModel::UIModel() : QObject(nullptr)
std::filesystem::create_directories(path);
config_path_ = path;
config_dir_name_ = (path /= "Targets").string().data();
config_dir_name_ = QString::fromStdWString((path /= "Targets").wstring().data());
if (!std::filesystem::exists(path))
std::filesystem::create_directories(path);
@ -58,7 +58,7 @@ void UIModel::readConfigs()
std::for_each(entries.begin(), entries.end(), [this](const auto& name) {
auto path = config_path_;
path /= config_dir_name_.toStdString();
path /= config_dir_name_.toStdWString();
path /= name.toStdWString();
QFile file(path);
if (!file.open(QIODevice::Text | QIODevice::ReadOnly)) {
@ -84,7 +84,7 @@ void UIModel::readConfigs()
json["maxFps"] = filejson["window"]["maxFps"];
json["scale"] = filejson["window"]["scale"];
json["disableOverlay"] = filejson["window"]["disableOverlay"];
json["maxControllers"] = filejson["controller"]["allowDesktopConfig"];
json["maxControllers"] = filejson["controller"]["maxControllers"];
json["allowDesktopConfig"] = filejson["controller"]["allowDesktopConfig"];
json["emulateDS4"] = filejson["controller"]["emulateDS4"];

@ -24,6 +24,8 @@ limitations under the License.
#include <string>
#include <vector>
#include <QDebug>
namespace VDFParser {
namespace crc {
template <typename CONT>
@ -67,6 +69,7 @@ static constexpr const char k_Devkit[] = {"Devkit"};
static constexpr const char k_DevkitGameID[] = {"DevkitGameID"};
static constexpr const char k_DevkitOverrideAppID[] = {"DevkitOverrideAppID"};
static constexpr const char k_LastPlayTime[] = {"LastPlayTime"};
static constexpr const char k_FlatpakAppID[] = {"FlatpakAppID"};
static constexpr const char k_tags[] = {"tags"};
enum VDFTypeId {
@ -75,7 +78,7 @@ enum VDFTypeId {
Number,
};
template <const char* const keyname, typename type, const uint8_t const _type_id>
template <const char* const keyname, typename type, const uint8_t _type_id>
struct VDFKeyPair {
VDFKeyPair() {}
explicit VDFKeyPair(type _value) : value(_value) {}
@ -104,58 +107,37 @@ struct VDFKeyPair {
}
};
template <uint8_t initialByte>
struct VDFIdx {
VDFIdx(){};
VDFIdx(const VDFIdx& other)
{
data[0] = other.data[0];
data[1] = other.data[1];
data = other.data;
};
VDFIdx(VDFIdx&& other)
{
data[0] = std::move(other.data[0]);
data[1] = std::move(other.data[1]);
data = std::move(other.data);
};
VDFIdx(int idx)
{
if (idx > 99) {
data[0] = initialByte;
data[1] = 0;
}
else if (idx < 10) {
data[1] = std::to_string(idx).c_str()[0];
}
else {
auto meh = std::to_string(idx).c_str();
data[0] = meh[0] + initialByte;
data[1] = meh[1];
}
data = std::to_string(idx);
}
char data[2] = {initialByte, 0x0};
std::string data;
operator int() const
{
if (data[0] == initialByte) {
int res = 0;
std::from_chars(&data[1], &data[1], res);
return res;
}
int res = 0;
char copy[2] = {data[0] - initialByte, data[1]};
std::from_chars(&copy[0], &copy[1], res);
std::from_chars(data.data(), data.data() + data.size(), res);
return res;
}
VDFIdx& operator=(const VDFIdx& other)
{
data[0] = other.data[0];
data[1] = other.data[1];
data = other.data;
return *this;
}
VDFIdx& operator=(VDFIdx&& other)
{
data[0] = std::move(other.data[0]);
data[1] = std::move(other.data[1]);
data = std::move(other.data);
return *this;
}
};
@ -164,30 +146,34 @@ struct ShortcutTag {
ShortcutTag(){};
ShortcutTag(const ShortcutTag& other)
{
idx = other.idx;
value = other.value;
};
ShortcutTag(ShortcutTag&& other)
{
idx = std::move(other.idx);
value = std::move(other.value);
};
VDFIdx<0x01> idx; // I Hope this is how it works... See VDFIdx
VDFIdx idx;
std::string value;
const uint16_t end_marker = 0x0808;
ShortcutTag& operator=(const ShortcutTag& other)
{
idx = other.idx;
value = other.value;
return *this;
}
ShortcutTag& operator=(ShortcutTag&& other)
{
idx = std::move(other.idx);
value = std::move(other.value);
return *this;
}
};
struct Shortcut {
VDFIdx<0x00> idx;
VDFIdx idx;
VDFKeyPair<k_appid, uint32_t, VDFTypeId::Number> appId{0x000000};
VDFKeyPair<k_appname, std::string, VDFTypeId::String> appName{""};
VDFKeyPair<k_exe, std::string, VDFTypeId::String> exe{"\"\""}; // Qouted
@ -203,6 +189,7 @@ struct Shortcut {
VDFKeyPair<k_DevkitGameID, std::string, VDFTypeId::String> DevkitGameID{""};
VDFKeyPair<k_DevkitOverrideAppID, uint32_t, VDFTypeId::Number> DevkitOverrideAppID{0}; //
VDFKeyPair<k_LastPlayTime, uint32_t, VDFTypeId::Number> LastPlayTime{0}; //
VDFKeyPair<k_FlatpakAppID, std::string, VDFTypeId::String> FlatpakAppID{""}; //
VDFKeyPair<k_tags, std::vector<ShortcutTag>, VDFTypeId::StringList> tags{};
Shortcut& operator=(const Shortcut& other)
{
@ -223,6 +210,7 @@ struct Shortcut {
DevkitGameID = other.DevkitGameID;
DevkitOverrideAppID = other.DevkitOverrideAppID;
LastPlayTime = other.LastPlayTime;
FlatpakAppID = other.FlatpakAppID;
tags = other.tags;
return *this;
}
@ -326,7 +314,7 @@ class Parser {
{
VDFFile vdffile;
ifile.open(path.string(), std::ios::binary | std::ios::in);
ifile.open(path, std::ios::binary | std::ios::in);
if (!ifile.is_open()) {
return {};
}
@ -352,34 +340,17 @@ class Parser {
}
char b = '\x0';
readVDFBuffer(&b, 1); // skip 0 byte
if (b != '\x0')
buff.push_back(b);
do {
if (ifile.eof()) {
break;
}
readVDFBuffer(&b, 1); // 1-2 bytes idx, 0x00 delmiter
if (b != '\x0')
buff.push_back(b);
} while (b != '\x0');
if (buff[0] == 0x08 && buff[1] == 0x08) {
break;
}
Shortcut shortcut;
if (buff.size() == 2) {
shortcut.idx.data[0] = buff[0];
shortcut.idx.data[1] = buff[1];
}
else {
shortcut.idx.data[0] = '\x0';
shortcut.idx.data[1] = buff[0];
shortcut.idx.data = readVDFString();
if (shortcut.idx.data == "\x08\x08") {
break;
}
while (true) // TODO;
{
if (ifile.eof()) {
break;
}
VDFTypeId tid = static_cast<VDFTypeId>(readVDFValue<uint8_t>());
const auto tid = static_cast<VDFTypeId>(readVDFValue<uint8_t>());
if (tid == 0x08) {
auto nextbyte = readVDFValue<uint8_t>();
if (nextbyte == 0x08) {
@ -455,29 +426,35 @@ class Parser {
shortcut.LastPlayTime.value = readVDFValue<uint32_t>();
continue;
}
if (key == shortcut.FlatpakAppID.key) {
shortcut.FlatpakAppID.value = readVDFString();
continue;
}
if (key == shortcut.tags.key) {
// TODO: read tags
ShortcutTag tag;
while (true) {
if (ifile.eof()) {
break;
}
char tbuff[2];
readVDFBuffer(tbuff, 2); // 2 bytes idx
readVDFBuffer(tbuff, 2); // 2 bytes POSSIBLE end marker
ifile.seekg(-1, std::ios_base::cur); // go one back, skip typeId
if (tbuff[0] == 0x08 && tbuff[1] == 0x08) {
ifile.seekg(-1, std::ios_base::cur); // another back
break;
}
tag.idx.data = readVDFString();
if (tag.idx.data == "\x08\x08") {
ifile.seekg(-2, std::ios_base::cur);
break;
}
tag.idx.data[0] = tbuff[0];
tag.idx.data[1] = tbuff[1];
ifile.seekg(1, std::ios_base::cur);
tag.value = readVDFString();
shortcut.tags.value.push_back(tag);
}
continue;
}
}
if (!(shortcut.idx.data[0] == 0x0 && shortcut.idx.data[1] == 0x0)) {
if (!(shortcut.idx.data == "\x00\x00")) {
vdffile.shortcuts.push_back(shortcut);
}
}
@ -489,9 +466,16 @@ class Parser {
static inline bool writeShortcuts(std::filesystem::path path, const VDFFile& vdffile)
{
const auto copied = std::filesystem::copy_file(path, path.string() + ".bak", std::filesystem::copy_options::update_existing);
const auto backupFileName = path.wstring() + L".bak";
if (std::filesystem::exists(path) && !std::filesystem::exists(backupFileName)) {
qDebug() << "No shortcuts backup detected... Creating now...";
const auto copied = std::filesystem::copy_file(path, backupFileName, std::filesystem::copy_options::update_existing);
if (!copied) {
qDebug() << "failed to copy shortcuts.vdf to backup!";
}
}
ofile.open(path.string(), std::ios::binary | std::ios::out);
ofile.open(path.wstring(), std::ios::binary | std::ios::out);
if (!ofile.is_open()) {
return false;
}
@ -499,10 +483,8 @@ class Parser {
ofile.write(vdffile.identifier.data(), vdffile.identifier.length());
ofile.write("\x00", 1);
for (auto& shortcut : vdffile.shortcuts) {
if (shortcut.idx.data[0] != '\x0') {
ofile.write("\x00", 1);
}
ofile.write(shortcut.idx.data, 2);
ofile.write("\x00", 1);
ofile.write(shortcut.idx.data.data(), shortcut.idx.data.length());
ofile.write("\x00", 1);
//
ofile.write((char*)&shortcut.appId.type_id, 1);
@ -586,11 +568,17 @@ class Parser {
ofile.write(shortcut.LastPlayTime.key, 13);
ofile.write((char*)&shortcut.LastPlayTime.value, 4);
//
ofile.write((char*)&shortcut.FlatpakAppID.type_id, 1);
ofile.write(shortcut.FlatpakAppID.key, 13);
ofile.write(shortcut.FlatpakAppID.value.data(), shortcut.FlatpakAppID.value.length());
ofile.write("\x00", 1);
//
ofile.write((char*)&shortcut.tags.type_id, 1);
ofile.write(shortcut.tags.key, 5);
for (auto& tag : shortcut.tags.value) {
ofile.write(tag.idx.data, 2);
ofile.write(tag.idx.data.data(), tag.idx.data.length());
ofile.write("\x00", 1);
ofile.write(tag.value.data(), tag.value.length());
ofile.write("\x00", 1);

@ -106,7 +106,6 @@ void myMessageHandler(QtMsgType type, const QMessageLogContext&, const QString&
std::cout << txt.toStdString() << "\n";
}
int main(int argc, char* argv[])
{
@ -140,14 +139,14 @@ int main(int argc, char* argv[])
if (argc >= 4) {
if (QString::fromStdString(argv[1]) == "remove") {
const auto write_res = uimodel.removeFromSteam(
QString::fromStdString(argv[2]), QString::fromStdString(argv[3]), true);
QCoreApplication::arguments().at(2), QCoreApplication::arguments().at(3), true);
if (write_res) {
return 0;
}
return 1;
} else if (QString::fromStdString(argv[1]) == "add") {
const auto write_res = uimodel.addToSteam(
QString::fromStdString(argv[2]), QString::fromStdString(argv[3]), true);
QCoreApplication::arguments().at(2), QCoreApplication::arguments().at(3), true);
if (write_res) {
return 0;
}

@ -14,5 +14,6 @@
<file>steamscreener.png</file>
<file>noise.png</file>
<file>GloSC_Icon_small.png</file>
<file>svg/help_outline_white_24dp.svg</file>
</qresource>
</RCC>

@ -80,6 +80,7 @@ Dialog {
anchors.top: title.bottom
anchors.topMargin: parent.spacing
spacing: 16
height: text.height + spacing
Label {
id: text
}
@ -89,7 +90,7 @@ Dialog {
anchors.top: col.bottom
anchors.topMargin: parent.spacing
spacing: 16
height: okbutton.height + spacing + parent.spacing
Button {
id: extrabutton
visible: extraButton
@ -100,6 +101,7 @@ Dialog {
}
Button {
id: okbutton
text: qsTr("OK")
onClicked: function(){
close()

@ -45,7 +45,7 @@ Item {
maxControllers: 4,
disableOverlay: false,
realDeviceIds: false,
allowDesktopConfig: true,
allowDesktopConfig: false,
emulateDS4: false,
})
@ -66,7 +66,7 @@ Item {
maxControllers: 4,
disableOverlay: false,
realDeviceIds: false,
allowDesktopConfig: true,
allowDesktopConfig: false,
emulateDS4: false,
})
}
@ -77,13 +77,13 @@ Item {
pathInput.text = shortcutInfo.launchPath || ""
argsInput.text = shortcutInfo.launchAppArgs || ""
closeOnExit.checked = shortcutInfo.closeOnExit || false
waitForChildren.checked = shortcutInfo.waitForChildProcs || true
waitForChildren.checked = shortcutInfo.waitForChildProcs
hideDevices.checked = shortcutInfo.hideDevices || false
windowMode.checked = shortcutInfo.windowMode || false
maxControllersSpinBox.value = shortcutInfo.maxControllers
disableOverlayCheckbox.checked = shortcutInfo.disableOverlay || false
realDeviceIds.checked = shortcutInfo.realDeviceIds || false
allowDesktopConfig.checked = shortcutInfo.allowDesktopConfig || true
allowDesktopConfig.checked = shortcutInfo.allowDesktopConfig || false
emulateDS4.checked = shortcutInfo.emulateDS4 || false
}
@ -321,7 +321,7 @@ Item {
RPane {
width: parent.width / 2 - 8
height: 394
height: 264
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -329,64 +329,99 @@ Item {
Column {
spacing: 2
width: parent.width
CheckBox {
id: hideDevices
text: qsTr("Hide (Real) Controllers")
checked: shortcutInfo.hideDevices
onCheckedChanged: shortcutInfo.hideDevices = checked
}
Label {
text: qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
Label {
text: qsTr("You can change this setting and which devices are hidden in the GlosSI overlay")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
Row {
CheckBox {
id: hideDevices
text: qsTr("Hide (Real) Controllers")
checked: shortcutInfo.hideDevices
onCheckedChanged: shortcutInfo.hideDevices = checked
}
RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Hide (Real) Controllers")
helpInfoDialog.text =
qsTr("Hides real game controllers from the system\nThis may prevent doubled inputs")
+ "\n"
+ qsTr("You can change this setting and which devices are hidden in the GlosSI overlay")
helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
}
}
Item {
width: 1
height: 4
}
CheckBox {
id: realDeviceIds
text: qsTr("Use real device (USB)-IDs")
checked: shortcutInfo.realDeviceIds
onCheckedChanged: shortcutInfo.realDeviceIds = checked
}
Label {
text: qsTr("Only enable if input's are not recognized by the game")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
}
Label {
text: qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
Row {
CheckBox {
id: realDeviceIds
text: qsTr("Use real device (USB)-IDs")
checked: shortcutInfo.realDeviceIds
onCheckedChanged: shortcutInfo.realDeviceIds = checked
}
RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Use real device (USB)-IDs")
helpInfoDialog.text =
qsTr("Only enable if input's are not recognized by the game")
+ "\n"
+ qsTr("If enabled, device-hiding won't work.\nUse the \"Max. Controller count\" setting!")
helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
}
}
Item {
width: 1
height: 4
}
CheckBox {
id: emulateDS4
text: qsTr("Emulate DS4")
checked: shortcutInfo.emulateDS4
onCheckedChanged: shortcutInfo.emulateDS4 = checked
}
Label {
text: qsTr("Instead of X360 Pad; Disable \"Playstation Configuration support\" in Steam")
wrapMode: Text.WordWrap
width: parent.width
leftPadding: 32
topPadding: -8
Row {
CheckBox {
id: emulateDS4
text: qsTr("Emulate DS4")
checked: shortcutInfo.emulateDS4
onCheckedChanged: shortcutInfo.emulateDS4 = checked
}
RoundButton {
onClicked: () => {
helpInfoDialog.titleText = qsTr("Emulate DS4")
helpInfoDialog.text =
qsTr("Instead of X360 Pad")
+ "\n"
+ qsTr("Disable \"Playstation Configuration support\" in Steam")
helpInfoDialog.open()
}
width: 48
height: 48
Material.elevation: 0
anchors.topMargin: 16
Image {
anchors.centerIn: parent
source: "qrc:/svg/help_outline_white_24dp.svg"
width: 24
height: 24
}
}
}
Item {
width: 1
@ -411,7 +446,7 @@ Item {
}
RPane {
width: parent.width / 2 - 8
height: 294
height: 264
radius: 4
Material.elevation: 32
bgOpacity: 0.97
@ -520,4 +555,14 @@ Item {
}
}
InfoDialog {
id: helpInfoDialog
titleText: qsTr("")
text: qsTr("")
extraButton: false
extraButtonText: qsTr("")
onConfirmedExtra: function(data) {
}
}
}

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

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

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="24px" viewBox="0 0 24 24" width="24px" fill="#FFFFFF"><path d="M0 0h24v24H0z" fill="none"/><path d="M11 18h2v-2h-2v2zm1-16C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8zm0-14c-2.21 0-4 1.79-4 4h2c0-1.1.9-2 2-2s2 .9 2 2c0 2-3 1.75-3 5h2c0-2.25 3-2.5 3-5 0-2.21-1.79-4-4-4z"/></svg>

After

Width:  |  Height:  |  Size: 400 B

@ -79,7 +79,7 @@ void AppLauncher::update()
std::erase_if(pids_, [](auto pid) {
const auto running = IsProcessRunning(pid);
if (!running)
spdlog::info("Child process with PID \"{}\" died", pid);
spdlog::trace("Child process with PID \"{}\" died", pid);
return !running;
});
if (Settings::launch.closeOnExit && pids_.empty() && Settings::launch.launch) {

@ -125,14 +125,14 @@
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;SPDLOG_WCHAR_TO_UTF8_SUPPORT;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SUBHOOK_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>_DEBUG;SPDLOG_WCHAR_TO_UTF8_SUPPORT;SPDLOG_WCHAR_FILENAMES;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SUBHOOK_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>hid.lib;Cfgmgr32.lib;opengl32.lib;sfml-window-d.lib;sfml-system-d.lib;sfml-graphics-d.lib;dwmapi.lib;xinput9_1_0.lib;setupapi.lib;ViGEmClient.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>hid.lib;Cfgmgr32.lib;opengl32.lib;sfml-window-d.lib;sfml-system-d.lib;sfml-graphics-d.lib;dwmapi.lib;xinput.lib;setupapi.lib;ViGEmClient.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>
@ -148,7 +148,7 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;SPDLOG_WCHAR_TO_UTF8_SUPPORT;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SUBHOOK_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>NDEBUG;SPDLOG_WCHAR_TO_UTF8_SUPPORT;SPDLOG_WCHAR_FILENAMES;_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;SUBHOOK_STATIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp20</LanguageStandard>
</ClCompile>
@ -157,7 +157,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>hid.lib;Cfgmgr32.lib;opengl32.lib;sfml-window.lib;sfml-system.lib;sfml-graphics.lib;dwmapi.lib;xinput9_1_0.lib;setupapi.lib;ViGEmClient.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalDependencies>hid.lib;Cfgmgr32.lib;opengl32.lib;sfml-window.lib;sfml-system.lib;sfml-graphics.lib;dwmapi.lib;XINPUT.lib;setupapi.lib;ViGEmClient.lib;Dbghelp.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Manifest>
<EnableDpiAwareness>PerMonitorHighDPIAware</EnableDpiAwareness>

@ -20,7 +20,6 @@ limitations under the License.
#include "HidHide.h"
#include <iostream>
#include <numeric>
#include <spdlog/spdlog.h>
#include <vector>
@ -147,112 +146,38 @@ void HidHide::UnPatchValveHooks()
{
spdlog::debug("Unpatching Valve HID hooks...");
// need to load addresses that way.. Otherwise we land before some jumps...
auto setupapidll = GetModuleHandle(L"setupapi.dll");
if (setupapidll) {
BYTE* addr = reinterpret_cast<BYTE*>(GetProcAddress(setupapidll, "SetupDiEnumDeviceInfo"));
if (addr) {
UnPatchHook(addr, SETUP_DI_ENUM_DEV_INFO_ORIG_BYTES);
spdlog::trace("Unpatched SetupDiEnumDeviceInfo");
}
else {
spdlog::error("failed to unpatch SetupDiEnumDeviceInfo");
}
//addr = reinterpret_cast<BYTE*>(GetProcAddress(setupapidll, "SetupDiGetClassDevsW"));
//if (addr) {
// UnPatchHook(addr, SETUP_DI_GETCLASSDEVSW_ORIG_BYTES);
// spdlog::trace("Unpatched SetupDiGetClassDevsW");
//}
//else {
// spdlog::error("failed to unpatch SetupDiGetClassDevsW");
//}
}
auto hiddll = GetModuleHandle(L"hid.dll");
if (hiddll) {
BYTE* addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidD_GetPreparsedData"));
if (addr) {
UnPatchHook(addr, HID_GETPREPARSED_ORIG_BYTES);
spdlog::trace("Unpatched HidD_GetPreparsedData");
}
else {
spdlog::error("failed to unpatch HidD_GetPreparsedData");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetCaps"));
if (addr) {
UnPatchHook(addr, HID_GETCAPS_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetCaps");
}
else {
spdlog::error("failed to unpatch HidP_GetCaps");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidD_GetAttributes"));
if (addr) {
UnPatchHook(addr, HID_GETATTRS_ORIG_BYTES);
spdlog::trace("Unpatched HidD_GetAttributes");
}
else {
spdlog::error("failed to unpatch HidD_GetAttributes");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidD_GetProductString"));
if (addr) {
UnPatchHook(addr, HID_GETPRODSTR_ORIG_BYTES);
spdlog::trace("Unpatched HidD_GetProductString");
}
else {
spdlog::error("failed to unpatch HidD_GetProductString");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetUsages"));
if (addr) {
UnPatchHook(addr, HID_GETUSAGE_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetUsages");
}
else {
spdlog::error("failed to unpatch HidP_GetUsages");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetData"));
if (addr) {
UnPatchHook(addr, HID_GETDATA_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetData");
}
else {
spdlog::error("failed to unpatch HidP_GetData");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetValueCaps"));
if (addr) {
UnPatchHook(addr, HID_GETVALUECAPS_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetValueCaps");
}
else {
spdlog::error("failed to unpatch HidP_GetValueCaps");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetUsageValue"));
if (addr) {
UnPatchHook(addr, HID_GETUSAGE_VAL_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetUsageValue");
}
else {
spdlog::error("failed to unpatch HidP_GetUsageValue");
}
addr = reinterpret_cast<BYTE*>(GetProcAddress(hiddll, "HidP_GetButtonCaps"));
if (addr) {
UnPatchHook(addr, HID_GETBTNCAPS_VAL_ORIG_BYTES);
spdlog::trace("Unpatched HidP_GetButtonCaps");
}
else {
spdlog::error("failed to unpatch HidP_GetButtonCaps");
if (const auto setupapidll = GetModuleHandle(L"setupapi.dll")) {
UnPatchHook("SetupDiEnumDeviceInfo", setupapidll);
//UnPatchHook("SetupDiGetClassDevsW", setupapidll);
}
if (const auto hiddll = GetModuleHandle(L"hid.dll")) {
for (const auto& name : ORIGINAL_BYTES | std::views::keys) {
if (name.starts_with("Hid")) {
UnPatchHook(name, hiddll);
}
}
}
}
void HidHide::UnPatchHook(BYTE* address, const std::string& bytes)
void HidHide::UnPatchHook(const std::string& name, HMODULE module)
{
spdlog::trace("Patching \"{}\"...", name);
BYTE* address = reinterpret_cast<BYTE*>(GetProcAddress(module, name.c_str()));
if (!address) {
spdlog::error("failed to unpatch \"{}\"", name);
}
auto bytes = ORIGINAL_BYTES.at(name);
DWORD dw_old_protect, dw_bkup;
const auto len = bytes.size();
VirtualProtect(address, len, PAGE_EXECUTE_READWRITE, &dw_old_protect); //Change permissions of memory..
VirtualProtect(address, len, PAGE_EXECUTE_READWRITE, &dw_old_protect); // Change permissions of memory..
for (DWORD i = 0; i < len; i++) //unpatch Valve's hook
{
*(address + i) = bytes[i];
}
VirtualProtect(address, len, dw_old_protect, &dw_bkup); //Revert permission change...
VirtualProtect(address, len, dw_old_protect, &dw_bkup); // Revert permission change...
spdlog::trace("Unpatched \"{}\"", name);
}
void HidHide::enableOverlayElement()
@ -397,7 +322,7 @@ DWORD HidHide::getRequiredOutputBufferSize(IOCTL_TYPE type) const
{
DWORD bytes_needed;
if (!DeviceIoControl(hidhide_handle, static_cast<DWORD>(type), nullptr, 0, nullptr, 0, &bytes_needed, nullptr)) {
spdlog::error("Couldn't determine required HidHide output buffer size; type: {}", type);
spdlog::error("Couldn't determine required HidHide output buffer size; type: {}", static_cast<int>(type));
return 0;
}
return bytes_needed;

@ -22,6 +22,7 @@ limitations under the License.
#include <SetupAPI.h>
#include <array>
#include <filesystem>
#include <map>
#include <string>
#include <vector>
#include <SFML/System/Clock.hpp>
@ -68,32 +69,24 @@ class HidHide {
private:
HANDLE hidhide_handle = nullptr;
// Valve Hooks `SetupDiEnumDeviceInfo` and hides Gaming devices like this.
// Valve Hooks various functions and hides Gaming devices like this.
// To be able to query them, unpatch the hook with the original bytes...
static inline const std::string SETUP_DI_ENUM_DEV_INFO_ORIG_BYTES = "\x48\x89\x5C\x24\x08";
// Valve also Hooks `SetupDiGetClassDevsW` ..unhook that as well...
static inline const std::string SETUP_DI_GETCLASSDEVSW_ORIG_BYTES = "\x48\x89\x5C\x24\x08";
// Valve also Hooks `HidD_GetPreparsedData` ..unhook that as well...
static inline const std::string HID_GETPREPARSED_ORIG_BYTES = "\x48\x89\x5C\x24\x18";
// ..aand `HidP_GetCaps`
static inline const std::string HID_GETCAPS_ORIG_BYTES = "\x4C\x8B\xD1\x48\x85\xC9";
// ...aaand `HidD_GetAttributes`
static inline const std::string HID_GETATTRS_ORIG_BYTES = "\x40\x53\x48\x83\xEC";
// ...aaaaand `HidD_GetProductString`
static inline const std::string HID_GETPRODSTR_ORIG_BYTES = "\x48\x83\xEC\x48\x48";
// ...aaaaand `HidP_GetUsages`
static inline const std::string HID_GETUSAGE_ORIG_BYTES = "\x4C\x89\x4C\x24\x20";
// ...aaaaand `HidP_GetData`
static inline const std::string HID_GETDATA_ORIG_BYTES = "\x4C\x89\x44\x24\x18";
// ...aaaaand `HidP_GetValueCaps`
static inline const std::string HID_GETVALUECAPS_ORIG_BYTES = "\x48\x83\xEC\x48\x49";
// ...aaaaand `HidP_GetUsageValue`
static inline const std::string HID_GETUSAGE_VAL_ORIG_BYTES = "\x40\x53\x55\x56\x48";
// ...aaaaand `HidP_GetButtonCaps`
static inline const std::string HID_GETBTNCAPS_VAL_ORIG_BYTES = "\x48\x83\xEC\x48\x49";
static inline const std::map<std::string, std::string> ORIGINAL_BYTES = {
{"SetupDiEnumDeviceInfo", "\x48\x89\x5C\x24\x08"},
{"SetupDiGetClassDevsW", "\x48\x89\x5C\x24\x08"},
{"HidD_GetPreparsedData", "\x48\x89\x5C\x24\x18"},
{"HidP_GetCaps", "\x4C\x8B\xD1\x48\x85\xC9"},
{"HidD_GetAttributes", "\x40\x53\x48\x83\xEC"},
{"HidD_GetProductString", "\x48\x83\xEC\x48\x48"},
{"HidP_GetUsages", "\x4C\x89\x4C\x24\x20"},
{"HidP_GetData", "\x4C\x89\x44\x24\x18"},
{"HidP_GetValueCaps", "\x48\x83\xEC\x48\x49"},
{"HidP_GetUsageValue", "\x40\x53\x55\x56\x48"},
{"HidP_GetButtonCaps", "\x48\x83\xEC\x48\x49"},
};
static void UnPatchValveHooks();
static void UnPatchHook(BYTE* address, const std::string& bytes);
static void UnPatchHook(const std::string& name, HMODULE module);
void enableOverlayElement();
sf::Clock overlay_elem_clock_;

@ -17,6 +17,8 @@ limitations under the License.
#include <filesystem>
#include <utility>
#include <locale>
#include <codecvt>
#include "Roboto.h"
@ -53,7 +55,8 @@ Overlay::Overlay(
if (!std::filesystem::exists(config_path))
std::filesystem::create_directories(config_path);
config_path /= "imgui.ini";
config_file_name_ = config_path.string();
// This assumes that char is utf8 and wchar_t is utf16, which is guaranteed on Windows.
config_file_name_ = std::wstring_convert<std::codecvt_utf8<wchar_t>>().to_bytes(config_path.wstring());
io.IniFilename = config_file_name_.data();
#endif

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,5,003000770004
PRODUCTVERSION 0,0,5,003000770004
FILEVERSION 0,0,7,1018000020006
PRODUCTVERSION 0,0,7,1018000020006
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@ -69,12 +69,12 @@ BEGIN
BEGIN
VALUE "CompanyName", "Peter Repukat - FlatspotSoftware"
VALUE "FileDescription", "GlosSI - SteamTarget"
VALUE "FileVersion", "0.0.5.0-3-gf77e0c4"
VALUE "FileVersion", "0.0.7.1-18-g0f2bac6"
VALUE "InternalName", "GlosSITarget"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSITarget.exe"
VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.5.0-3-gf77e0c4"
VALUE "ProductVersion", "0.0.7.1-18-g0f2bac6"
END
END
BLOCK "VarFileInfo"
@ -127,6 +127,62 @@ IDI_ICON1 ICON "GloSC_Icon.ico"

@ -20,6 +20,8 @@ limitations under the License.
#include <string>
#include <nlohmann/json.hpp>
#include <spdlog/spdlog.h>
#include <locale>
#include <codecvt>
namespace Settings {
@ -46,7 +48,7 @@ inline struct Window {
inline struct Controller {
int maxControllers = 4;
bool allowDesktopConfig = Settings::launch.launch;
bool allowDesktopConfig = false;
bool emulateDS4 = false;
} controller;
@ -62,10 +64,10 @@ inline bool checkIsUwp(const std::wstring& launch_path)
return false;
}
inline void Parse(std::string arg1)
inline void Parse(std::wstring arg1)
{
if (!arg1.ends_with(".json")) {
arg1 += ".json";
if (!arg1.ends_with(L".json")) {
arg1 += L".json";
}
std::filesystem::path path(arg1);
if (path.has_extension() && !std::filesystem::exists(path)) {
@ -82,7 +84,7 @@ inline void Parse(std::string arg1)
std::ifstream json_file;
json_file.open(path);
if (!json_file.is_open()) {
spdlog::error("Couldn't open settings file {}", path.string());
spdlog::error(L"Couldn't open settings file {}", path.wstring());
return;
}
const auto json = nlohmann::json::parse(json_file);
@ -111,10 +113,8 @@ inline void Parse(std::string arg1)
std::string meh;
safeParseValue(object, key, meh);
if (!meh.empty()) {
value.clear();
std::ranges::transform(meh, std::back_inserter(value), [](const auto& ch) {
return static_cast<wchar_t>(ch);
});
// This assumes that char is utf8 and wchar_t is utf16, which is guaranteed on Windows.
value = std::wstring_convert<std::codecvt_utf8_utf16<wchar_t>>().from_bytes(meh);
}
};
@ -146,7 +146,7 @@ inline void Parse(std::string arg1)
json_file.close();
spdlog::debug("Read config file \"{}\"", path.string());
spdlog::debug(L"Read config file \"{}\"", path.wstring());
if (launch.launch) {
launch.isUWP = checkIsUwp(launch.launchPath);

@ -30,7 +30,7 @@ limitations under the License.
#include <tray.hpp>
#endif
SteamTarget::SteamTarget(int argc, char* argv[])
SteamTarget::SteamTarget()
: window_(
[this] { run_ = false; },
[this] { toggleGlossiOverlay(); },
@ -270,8 +270,8 @@ std::vector<std::string> SteamTarget::getOverlayHotkey()
std::ifstream config_file(config_path);
auto root = tyti::vdf::read(config_file);
auto children = root.childs["system"];
if (children->attribs.find("InGameOverlayShortcutKey") == children->attribs.end()) {
std::shared_ptr<tyti::vdf::basic_object<char>> children = root.childs["system"];
if (!children || children->attribs.empty() || !children->attribs.contains("InGameOverlayShortcutKey")) {
spdlog::warn("Couldn't detect overlay hotkey, using default: Shift+Tab");
return {"Shift", "KEY_TAB"}; // default
}
@ -311,8 +311,8 @@ std::vector<std::string> SteamTarget::getScreenshotHotkey()
std::ifstream config_file(config_path);
auto root = tyti::vdf::read(config_file);
auto children = root.childs["system"];
if (children->attribs.find("InGameOverlayScreenshotHotKey") == children->attribs.end()) {
std::shared_ptr<tyti::vdf::basic_object<char>> children = root.childs["system"];
if (!children || children->attribs.empty() || !children->attribs.contains("InGameOverlayScreenshotHotKey")) {
spdlog::warn("Couldn't detect overlay hotkey, using default: F12");
return {"KEY_F12"}; //default
}
@ -352,7 +352,7 @@ bool SteamTarget::getXBCRebindingEnabled()
std::ifstream config_file(config_path);
auto root = tyti::vdf::read(config_file);
if (root.attribs.find("SteamController_XBoxSupport") == root.attribs.end()) {
if (root.attribs.empty() || !root.attribs.contains("SteamController_XBoxSupport")) {
spdlog::warn("\"Xbox Configuration Support\" is disabled in Steam. This may cause doubled Inputs!");
return false;
}

@ -32,7 +32,7 @@ limitations under the License.
class SteamTarget {
public:
explicit SteamTarget(int argc, char* argv[]);
explicit SteamTarget();
int run();
private:

@ -27,6 +27,7 @@ limitations under the License.
#include "OverlayLogSink.h"
#include "Settings.h"
#include <iostream>
#ifdef _WIN32
@ -126,9 +127,10 @@ int main(int argc, char* argv[])
if (!std::filesystem::exists(path))
std::filesystem::create_directories(path);
path /= "glossitarget.log";
const auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(path.string(), true);
// For "path.wstring()" to be usable here, SPDLOG_WCHAR_FILENAMES must be defined.
const auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(path.wstring(), true);
#else
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>("/tmp/glossitarget.log", true);
auto file_sink = std::make_shared<spdlog::sinks::basic_file_sink_mt>(L"/tmp/glossitarget.log", true);
#endif
file_sink->set_level(spdlog::level::trace);
@ -148,21 +150,23 @@ int main(int argc, char* argv[])
auto exit = 1;
try {
#ifdef _WIN32
std::string argsv = "";
if (__argc > 1) {
for (int i = 1; i < __argc; i++)
argsv += i == 1 ? __argv[i] : std::string(" ") + __argv[i];
int numArgs;
LPWSTR* args = CommandLineToArgvW(GetCommandLine(), &numArgs);
std::wstring argsv = L"";
if (numArgs > 1) {
for (int i = 1; i < numArgs; i++)
argsv += i == 1 ? args[i] : std::wstring(L" ") + args[i];
}
Settings::Parse(argsv);
SteamTarget target(__argc, __argv);
#else
SteamTarget target;
#else // Code below is broken now due to parse requiring std::wstring instead of std:string. Sorry.
std::string argsv = "";
if (argc > 1) {
for (int i = 1; i < argc; i++)
argsv += i == 1 ? argv[i] : std::string(" ") + argv[i];
}
Settings::Parse(argsv);
SteamTarget target(argc, argv);
SteamTarget target;
#endif
exit = target.run();
}

@ -1,38 +1,8 @@
diff --git a/src/ViGEmClient.vcxproj b/src/ViGEmClient.vcxproj
index 7c186414e62a6334fbcd518d506f55db57491dfe..2955df4d391b37bf0b71e17df8bd161c1014a0c4 100644
index 7c186414e62a6334fbcd518d506f55db57491dfe..6b71920a9b848e4a5a3ffb314a2e009a7a22502f 100644
--- a/src/ViGEmClient.vcxproj
+++ b/src/ViGEmClient.vcxproj
@@ -49,52 +49,52 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_DLL|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_LIB|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release_DLL|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
- <PlatformToolset>v142</PlatformToolset>
+ <PlatformToolset>v143</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
@@ -75,26 +75,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug_LIB|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>

@ -8,7 +8,8 @@ msbuild.exe GlosSI.sln /t:Build /p:Configuration=Release /p:Platform=x64
cd ./x64/Release/
$env:Path += ';C:\Qt\6.2.4\msvc2019_64\bin'
$env:Path += ';C:\Qt\6.3.1\msvc2019_64\bin'
$env:Path += ';C:\Program Files\7-Zip'
Get-ChildItem -Rec | Where {$_.Extension -match "lib"} | Remove-Item
$env:Path = "$env:QTDIR\bin;$env:Path"

@ -0,0 +1,22 @@
powershell.exe .\download_release_deps.ps1
cd ./x64/Release/
Get-ChildItem -Rec | Where {$_.Extension -match "lib"} | Remove-Item
$env:Path = "$env:QTDIR\bin;$env:Path"
windeployqt.exe --release --qmldir ../../GlosSIConfig/qml ./GlosSIConfig.exe
Copy-Item "..\..\deps\SFML\out\Release\lib\RelWithDebInfo\sfml-graphics-2.dll" -Destination "."
Copy-Item "..\..\deps\SFML\out\Release\lib\RelWithDebInfo\sfml-system-2.dll" -Destination "."
Copy-Item "..\..\deps\SFML\out\Release\lib\RelWithDebInfo\sfml-window-2.dll" -Destination "."
Copy-Item "..\..\GlosSIConfig\GetAUMIDs.ps1" -Destination "."
Copy-Item "..\..\HidHideSetup.exe" -Destination "."
Copy-Item "..\..\ViGEmBusSetup_x64.exe" -Destination "."
Copy-Item "..\..\vc_redist.x64.exe" -Destination "."
Copy-Item "..\..\LICENSE" -Destination "./LICENSE"
Copy-Item "..\..\QT_License" -Destination "./QT_License"
Copy-Item "..\..\THIRD_PARTY_LICENSES.txt" -Destination "./THIRD_PARTY_LICENSES.txt"
7z a GlosSI-snapshot.zip *

2
deps/ViGEmClient vendored

@ -1 +1 @@
Subproject commit e99ba7755ec0fbc054c6208cab482ba657ea5d38
Subproject commit c8c312ef33d6112dbb8b86d5cd80d25716d32ff1

2
deps/WinReg vendored

@ -1 +1 @@
Subproject commit 023ad61dc77c83407e7ae061f177a3ba3d3941e6
Subproject commit a4907f31deaca15ca27cc41e5506f54e9f05d3a4

2
deps/imgui vendored

@ -1 +1 @@
Subproject commit 55d35d8387c15bf0cfd71861df67af8cfbda7456
Subproject commit 9aae45eb4a05a5a1f96be1ef37eb503a12ceb889

2
deps/imgui-sfml vendored

@ -1 +1 @@
Subproject commit 8bc196c5eaadb342712407eb06fc2f53edfde227
Subproject commit 9cc8c57a4565551087be0d9aeb3ae55490aa1207

2
deps/json vendored

@ -1 +1 @@
Subproject commit f5b3fb326c1a651cd3e62201b0e7074cf987f748
Subproject commit bc889afb4c5bf1c0d8ee29ef35eaaf4c8bef8a5d

2
deps/spdlog vendored

@ -1 +1 @@
Subproject commit 8826011c81b69e1f8427be520b357c19c74ea480
Subproject commit f44fa31f5110331af196d0ed7f00ae1c7b8ef3cc

2
deps/subhook vendored

@ -1 +1 @@
Subproject commit 284047b761bd61e3c0518b0be235aa77172b1010
Subproject commit 83d4e1ebef3588fae48b69a7352cc21801cb70bc

2
deps/traypp vendored

@ -1 +1 @@
Subproject commit 8ea68626a484de06d48ebcba8db99f8fd393ddd4
Subproject commit 698db7d58dd450cc9e30dc12d3bd0c5ca4d6a5b1

@ -1,3 +1,3 @@
Invoke-WebRequest -o ViGEmBusSetup_x64.msi https://github.com/ViGEm/ViGEmBus/releases/download/setup-v1.17.333/ViGEmBusSetup_x64.msi
Invoke-WebRequest -o HidHideMSI.msi https://github.com/ViGEm/HidHide/releases/download/v1.1.50.0/HidHideMSI.msi
Invoke-WebRequest -o ViGEmBusSetup_x64.exe https://github.com/ViGEm/ViGEmBus/releases/download/v1.18.367.0/ViGEmBus_1.18.367_x64_x86.exe
Invoke-WebRequest -o HidHideSetup.exe https://github.com/ViGEm/HidHide/releases/download/v1.2.98.0/HidHide_1.2.98_x64.exe
Invoke-WebRequest -o vc_redist.x64.exe https://aka.ms/vs/16/release/vc_redist.x64.exe

@ -1,5 +1,5 @@
git submodule init
git submodule update --recursive
git submodule update --recursive --force
.\buildSFML.ps1
.\buildViGEmClient.ps1

Loading…
Cancel
Save