fixed metal hud preference resetting to default
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (push) Has been cancelled
Some checks failed
Build Go/Fyne App for macOS ARM64 / build (push) Has been cancelled
This commit is contained in:
@@ -3,4 +3,4 @@
|
||||
Name = "TurtleSilicon"
|
||||
ID = "com.tairasu.turtlesilicon"
|
||||
Version = "1.2.4"
|
||||
Build = 77
|
||||
Build = 78
|
||||
|
@@ -16,7 +16,7 @@ import (
|
||||
"fyne.io/fyne/v2/dialog"
|
||||
)
|
||||
|
||||
var EnableMetalHud = true // Default to enabled
|
||||
var EnableMetalHud = false // Default to disabled
|
||||
var CustomEnvVars = "" // Custom environment variables
|
||||
var EnableVanillaTweaks = false // Default to disabled
|
||||
var AutoDeleteWdb = false // Default to disabled
|
||||
|
@@ -25,9 +25,14 @@ func createOptionsComponents() {
|
||||
|
||||
metalHudCheckbox = widget.NewCheck("Enable Metal Hud (show FPS)", func(checked bool) {
|
||||
launcher.EnableMetalHud = checked
|
||||
// Save to preferences
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EnableMetalHud = checked
|
||||
utils.SavePrefs(prefs)
|
||||
debug.Printf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
})
|
||||
metalHudCheckbox.SetChecked(launcher.EnableMetalHud)
|
||||
metalHudCheckbox.SetChecked(prefs.EnableMetalHud)
|
||||
launcher.EnableMetalHud = prefs.EnableMetalHud
|
||||
|
||||
showTerminalCheckbox = widget.NewCheck("Show Terminal", func(checked bool) {
|
||||
// Save to preferences
|
||||
|
@@ -16,6 +16,7 @@ type UserPrefs struct {
|
||||
EnableVanillaTweaks bool `json:"enable_vanilla_tweaks"`
|
||||
RemapOptionAsAlt bool `json:"remap_option_as_alt"`
|
||||
AutoDeleteWdb bool `json:"auto_delete_wdb"`
|
||||
EnableMetalHud bool `json:"enable_metal_hud"`
|
||||
|
||||
// Graphics settings
|
||||
ReduceTerrainDistance bool `json:"reduce_terrain_distance"`
|
||||
|
Reference in New Issue
Block a user