Skip to content

Commit a0fd3bc

Browse files
authored
Merge pull request #359 from No0ne558/master
Auto-Update vt_data Inconsistency Between Displays
2 parents 3b295e4 + 8f1003d commit a0fd3bc

2 files changed

Lines changed: 11 additions & 6 deletions

File tree

‎docs/changelog.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
77
## [Unreleased]
88

99
### Fixed
10+
- **Auto-Update vt_data Inconsistency Between Displays (2026-02-12)**
11+
- Fixed bug where vt_data auto-update setting behaved differently on server display vs external displays
12+
- **Root Cause**: The auto_update_vt_data setting was loaded from the settings file in the data directory, which could be different for different displays in multi-display setups
13+
- **Solution**: Modified the auto-update check to load the setting from a fixed path (/usr/viewtouch/dat/settings.dat) to ensure consistency across all displays
14+
- **Impact**: vt_data auto-update setting now works consistently regardless of which display is used to start the system
15+
- **Files modified**: `main/data/manager.cc`
1016
- **Hardware Button Type: Server Terminal Duplicates and Printer Removal (2026-02-12)**
1117
- Fixed bugs in Hardware zone that created duplicate server terminals and incorrectly removed shared printers
1218
- **Bug 1: Duplicate Server Terminals**

‎main/data/manager.cc‎

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -681,16 +681,15 @@ int main(int argc, genericChar* argv[])
681681
// Check if vt_data exists locally first
682682
bool vt_data_updated = false;
683683

684-
// Check if auto-update is enabled by loading settings
684+
// Check if auto-update is enabled by loading settings from a fixed location
685+
// to ensure consistency across all displays
685686
bool auto_update_enabled = true; // Default to enabled for backward compatibility
686687

687-
// Load settings from the master settings file using the same method as StartSystem
688-
std::array<char, STRLONG> settings_path{};
689-
MasterSystem->FullPath(MASTER_SETTINGS, settings_path.data());
688+
std::string fixed_settings_path = std::string(VIEWTOUCH_PATH) + "/dat/settings.dat";
690689

691-
if (fs::exists(settings_path.data())) {
690+
if (fs::exists(fixed_settings_path)) {
692691
Settings temp_settings;
693-
if (temp_settings.Load(settings_path.data()) == 0) {
692+
if (temp_settings.Load(fixed_settings_path.c_str()) == 0) {
694693
auto_update_enabled = temp_settings.auto_update_vt_data;
695694
if (!auto_update_enabled) {
696695
ReportError(GlobalTranslate("Auto-update of vt_data is disabled in settings"));

0 commit comments

Comments
 (0)