| 64 | } |
| 65 | |
| 66 | void ConfigurationSystem::Initialize(const AppConfig& cliArgs) |
| 67 | { |
| 68 | if (m_initialized) |
| 69 | { |
| 70 | return; |
| 71 | } |
| 72 | |
| 73 | LOG_TRACE(Config, "Initializing configuration system..."); |
| 74 | LOG_TRACE(Config, " Priority order: CLI > Defaults"); |
| 75 | |
| 76 | // Load in priority order (lowest to highest) |
| 77 | LoadDefaults(); |
| 78 | ApplyCommandLine(cliArgs); |
| 79 | |
| 80 | // EngineConfig is a view over ConfigStore's GameConfig — no sync needed. |
| 81 | // Apply the 3 standalone globals that aren't behind ENGINE_CONFIG. |
| 82 | ApplyToLegacyGlobConfig(); |
| 83 | |
| 84 | m_initialized = true; |
| 85 | |
| 86 | // Log final configuration at DEBUG level |
| 87 | LOG_DEBUG(Config, "Configuration loaded: {} settings total", m_config.size()); |
| 88 | LOG_INFO(Config, "Configuration system ready"); |
| 89 | } |
| 90 | |
| 91 | void ConfigurationSystem::Shutdown() |
| 92 | { |