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:
acehighdan
2026-04-12 03:04:27 -07:00
committed by Adam Honse
parent aff0610df9
commit e8f345ff77

View File

@@ -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()