//------------------------------------------- LOAD AUTO MENU DATA ------------------------------------------ void GameImpl::loadAutoMenuData() { this->autoMenuManager.reloadConfig(); // Not related to the auto-menu, but it should be loaded every time auto menu data gets reloaded this->seedOverride = LoadConfigInt("starcraft", "seed_override", std::numeric_limits<decltype(this->seedOverride)>::max()); this->speedOverride = LoadConfigInt("starcraft", "speed_override", std::numeric_limits<decltype(this->speedOverride)>::min()); this->wantDropPlayers = LoadConfigStringUCase("starcraft", "drop_players", "ON") == "ON"; }
void InitPrimaryConfig() { static bool isPrimaryConfigInitialized = false; // Return if already initialized if ( isPrimaryConfigInitialized ) return; isPrimaryConfigInitialized = true; // ------------------------- GENERAL/GLOBAL CONFIG OPTIONS ---------------------------------- // Get screenshot format screenshotFmt = LoadConfigString("starcraft", "screenshots", "gif"); if ( !screenshotFmt.empty() ) screenshotFmt.insert(0, "."); // Check if warning dialogs should be shown showWarn = LoadConfigStringUCase("config", "show_warnings", "YES") == "YES"; // Check if shared memory should be enabled serverEnabled = LoadConfigStringUCase("config", "shared_memory", "ON") == "ON"; // Get process count gdwProcNum = getProcessCount("StarCraft.exe"); // ------------------------- WMODE CONFIG OPTIONS ---------------------------------- // Load windowed mode position and fullscreen setting windowRect.left = LoadConfigInt("window", "left"); windowRect.top = LoadConfigInt("window", "top"); windowRect.right = LoadConfigInt("window", "width"); windowRect.bottom = LoadConfigInt("window", "height"); switchToWMode = LoadConfigStringUCase("window", "windowed", "OFF") == "ON"; // Limit minimum w-mode size if ( windowRect.right < WMODE_MIN_WIDTH ) windowRect.right = WMODE_MIN_WIDTH; if ( windowRect.bottom < WMODE_MIN_HEIGHT ) windowRect.bottom = WMODE_MIN_HEIGHT; }