@@ -7,8 +7,8 @@ import (
|
||||
"regexp"
|
||||
"strings"
|
||||
|
||||
"turtlesilicon/pkg/debug"
|
||||
"turtlesilicon/pkg/paths"
|
||||
"epochsilicon/pkg/debug"
|
||||
"epochsilicon/pkg/paths"
|
||||
)
|
||||
|
||||
// RecommendedSettings contains the recommended graphics settings for optimal performance
|
||||
@@ -24,12 +24,12 @@ var RecommendedSettings = map[string]string{
|
||||
// CheckRecommendedSettings reads the Config.wtf file and checks if all recommended settings are applied
|
||||
// Returns true if all settings are correctly applied, false otherwise
|
||||
func CheckRecommendedSettings() bool {
|
||||
if paths.TurtlewowPath == "" {
|
||||
debug.Printf("TurtleWoW path not set, cannot check Config.wtf")
|
||||
if paths.EpochPath == "" {
|
||||
debug.Printf("Epoch path not set, cannot check Config.wtf")
|
||||
return false
|
||||
}
|
||||
|
||||
configPath := filepath.Join(paths.TurtlewowPath, "WTF", "Config.wtf")
|
||||
configPath := filepath.Join(paths.EpochPath, "WTF", "Config.wtf")
|
||||
|
||||
if _, err := os.Stat(configPath); os.IsNotExist(err) {
|
||||
debug.Printf("Config.wtf not found at %s", configPath)
|
||||
@@ -73,11 +73,11 @@ func isSettingCorrect(configText, setting, expectedValue string) bool {
|
||||
|
||||
// ApplyRecommendedSettings applies all recommended graphics settings to Config.wtf
|
||||
func ApplyRecommendedSettings() error {
|
||||
if paths.TurtlewowPath == "" {
|
||||
return fmt.Errorf("TurtleWoW path not set")
|
||||
if paths.EpochPath == "" {
|
||||
return fmt.Errorf("Epoch path not set")
|
||||
}
|
||||
|
||||
configPath := filepath.Join(paths.TurtlewowPath, "WTF", "Config.wtf")
|
||||
configPath := filepath.Join(paths.EpochPath, "WTF", "Config.wtf")
|
||||
|
||||
// Create WTF directory if it doesn't exist
|
||||
wtfDir := filepath.Dir(configPath)
|
||||
|
Reference in New Issue
Block a user