added graphics settings section with more control (shadowLOD and libSilicon can be turned off)

This commit is contained in:
aomizu
2025-07-10 13:36:21 +09:00
parent 2766aee96f
commit 9fd6ca731c
8 changed files with 726 additions and 34 deletions

View File

@@ -1,7 +1,9 @@
package ui
import (
"turtlesilicon/pkg/debug"
"turtlesilicon/pkg/paths"
"turtlesilicon/pkg/patching"
"turtlesilicon/pkg/utils"
"fyne.io/fyne/v2"
@@ -35,6 +37,18 @@ func CreateUI(myWindow fyne.Window) fyne.CanvasObject {
// Check default CrossOver path
paths.CheckDefaultCrossOverPath()
// Check graphics settings presence and set default state
patching.CheckGraphicsSettingsPresence()
// Load graphics settings from Config.wtf and update UI
if err := patching.LoadGraphicsSettingsFromConfig(); err != nil {
// Log error but continue - this is not critical for app startup
debug.Printf("Warning: failed to load graphics settings from Config.wtf: %v", err)
} else {
// Refresh checkbox states to reflect loaded settings
refreshGraphicsSettingsCheckboxes()
}
// Create header, main content and bottom bar
headerContent := createHeaderContainer()
mainContent := createMainContent(myWindow)