mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-24 22:45:55 -04:00
Settings Rework
* Add JSON string configuration field to RGBController to store device-specific configurations
* This JSON string holds both configuration and schema
* Add settings schema tracking to SettingsManager
* Implement dynamic settings widget that generates a settings UI based on a JSON schema
* Implement SettingsManager callback for notifying of settings changes and settings schema updates
* Always enable Entire Device zone option and use it to enable Edit Device
* Rename SaveSizes to SaveConfiguration in ProfileManager and Sizes.json to Configuration.json
* Add zone flag for indicating that a zone's geometry may change, informing profile manager to ignore this check
* Remove Theme setting and Theme Manager, as this didn't work on most setups anyways and Qt6 has proper Windows dark theming
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
|
||||
#include <chrono>
|
||||
#include "DetectionManager.h"
|
||||
#include "JsonUtils.h"
|
||||
#include "LogManager.h"
|
||||
#include "pci_ids.h"
|
||||
#include "ProfileManager.h"
|
||||
@@ -30,11 +31,6 @@ using namespace std::chrono_literals;
|
||||
\*---------------------------------------------------------*/
|
||||
const char* DETECTIONMANAGER = "DetectionManager";
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Define a macro for QT lupdate to parse |
|
||||
\*---------------------------------------------------------*/
|
||||
#define QT_TRANSLATE_NOOP(scope, x) x
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Warning Strings |
|
||||
\*---------------------------------------------------------*/
|
||||
@@ -597,8 +593,6 @@ void DetectionManager::BackgroundDetectDevices()
|
||||
hid_device_info* current_hid_device;
|
||||
json detector_settings;
|
||||
hid_device_info* hid_devices = NULL;
|
||||
bool hid_safe_mode = false;
|
||||
unsigned int initial_detection_delay_ms = 0;
|
||||
|
||||
LOG_INFO("------------------------------------------------------");
|
||||
LOG_INFO("| Start device detection |");
|
||||
@@ -621,18 +615,12 @@ void DetectionManager::BackgroundDetectDevices()
|
||||
/*-----------------------------------------------------*\
|
||||
| Check HID safe mode setting |
|
||||
\*-----------------------------------------------------*/
|
||||
if(detector_settings.contains("hid_safe_mode"))
|
||||
{
|
||||
hid_safe_mode = detector_settings["hid_safe_mode"];
|
||||
}
|
||||
bool hid_safe_mode = JsonUtils::JsonGetBool(detector_settings, "hid_safe_mode");
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| Check initial detection delay setting |
|
||||
\*-----------------------------------------------------*/
|
||||
if(detector_settings.contains("initial_detection_delay_ms"))
|
||||
{
|
||||
initial_detection_delay_ms = detector_settings["initial_detection_delay_ms"];
|
||||
}
|
||||
unsigned int initial_detection_delay_ms = JsonUtils::JsonGetInt(detector_settings, "initial_detection_delay_ms");
|
||||
|
||||
/*-----------------------------------------------------*\
|
||||
| If configured, delay detection for the configured |
|
||||
|
||||
Reference in New Issue
Block a user