GlosSITarget: parse & use real device id setting from json

pull/169/head
Peter Repukat 2 years ago
parent d7dd8d30cc
commit 265478ee6a

@ -51,6 +51,7 @@ void InputRedirector::run()
run_ = vigem_connected_;
controller_thread_ = std::thread(&InputRedirector::runLoop, this);
max_controller_count_ = Settings::controller.maxControllers;
use_real_vid_pid_ = Settings::devices.realDeviceIds;
#ifdef _WIN32
Overlay::AddOverlayElem([this]() {
ImGui::SetNextWindowPos({650, 450}, ImGuiCond_FirstUseEver);
@ -75,7 +76,7 @@ void InputRedirector::run()
ImGui::Text("When changing this, it's advised to also set Max. controller count");
ImGui::Text("to prevent having multiple mirrored controllers plugged in");
ImGui::Spacing();
ImGui::Text("If enabled, Device hiding can't show if a controller is emulated.");
ImGui::Text("If enabled, Device hiding won't work! Use \"Max. Controller count\"-setting.");
bool use_real_copy = use_real_vid_pid_;
ImGui::Checkbox("Use real USB-IDs", &use_real_copy);
if (use_real_vid_pid_ != use_real_copy) {

@ -51,8 +51,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 0,0,4,20068
PRODUCTVERSION 0,0,4,20068
FILEVERSION 0,0,5,003000770004
PRODUCTVERSION 0,0,5,003000770004
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.4.1-23-g23aebd4"
VALUE "FileVersion", "0.0.5.0-3-gf77e0c4"
VALUE "InternalName", "GlosSITarget"
VALUE "LegalCopyright", "Copyright (C) 2021 Peter Repukat - FlatspotSoftware"
VALUE "OriginalFilename", "GlosSITarget.exe"
VALUE "ProductName", "GlosSI"
VALUE "ProductVersion", "0.0.4.1-23-g23aebd4"
VALUE "ProductVersion", "0.0.5.0-3-gf77e0c4"
END
END
BLOCK "VarFileInfo"
@ -108,3 +108,27 @@ IDI_ICON1 ICON "GloSC_Icon.ico"
/////////////////////////////////////////////////////////////////////////////
#endif // not APSTUDIO_INVOKED

@ -34,6 +34,7 @@ inline struct Launch {
inline struct Devices {
bool hideDevices = true;
bool realDeviceIds = false;
} devices;
inline struct Window {
@ -119,6 +120,7 @@ inline void Parse(std::string arg1)
if (auto devconf = json["devices"]; devconf.is_object()) {
safeParseValue(devconf, "hideDevices", devices.hideDevices);
safeParseValue(devconf, "realDeviceIds", devices.realDeviceIds);
}
if (auto winconf = json["window"]; winconf.is_object()) {

Loading…
Cancel
Save