mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-05-10 07:32:56 -04:00
Sync autostart system configuration with OpenRGB settings on startup
If the autostart system configuration is deleted (e.g. by a reinstall or package manager) but the JSON config still has enabled=true, OpenRGB would silently fail to start at login. Fix by calling ConfigureAutoStart() in the settings page constructor so the system configuration is always reconciled with the stored JSON state every time OpenRGB starts. Commit amended to make wording more generic by Adam Honse <calcprogrammer1@gmail.com>
This commit is contained in:
@@ -343,6 +343,14 @@ OpenRGBSettingsPage::OpenRGBSettingsPage(QWidget *parent) :
|
||||
|
||||
ui->AutoStartStatusLabel->hide();
|
||||
autostart_initialized = true;
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Sync the autostart system configuration with settings on |
|
||||
| startup. This ensures the file is recreated if it was |
|
||||
| deleted (e.g. by a reinstall) without requiring the user |
|
||||
| to manually toggle the checkbox. |
|
||||
\*---------------------------------------------------------*/
|
||||
ConfigureAutoStart();
|
||||
}
|
||||
|
||||
OpenRGBSettingsPage::~OpenRGBSettingsPage()
|
||||
|
||||
Reference in New Issue
Block a user