change to zerolog
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
package ui
|
||||
|
||||
import (
|
||||
"github.com/rs/zerolog/log"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"epochsilicon/pkg/debug"
|
||||
"epochsilicon/pkg/launcher"
|
||||
"epochsilicon/pkg/patching"
|
||||
"epochsilicon/pkg/service"
|
||||
@@ -27,7 +27,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EnableMetalHud = checked
|
||||
utils.SavePrefs(prefs)
|
||||
debug.Printf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
log.Debug().Msgf("Metal HUD enabled: %v", launcher.EnableMetalHud)
|
||||
})
|
||||
metalHudCheckbox.SetChecked(prefs.EnableMetalHud)
|
||||
launcher.EnableMetalHud = prefs.EnableMetalHud
|
||||
@@ -37,7 +37,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.ShowTerminalNormally = checked
|
||||
utils.SavePrefs(prefs)
|
||||
debug.Printf("Show terminal normally: %v", checked)
|
||||
log.Debug().Msgf("Show terminal normally: %v", checked)
|
||||
})
|
||||
showTerminalCheckbox.SetChecked(prefs.ShowTerminalNormally)
|
||||
|
||||
@@ -47,7 +47,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.AutoDeleteWdb = checked
|
||||
utils.SavePrefs(prefs)
|
||||
debug.Printf("Auto-delete WDB enabled: %v", launcher.AutoDeleteWdb)
|
||||
log.Debug().Msgf("Auto-delete WDB enabled: %v", launcher.AutoDeleteWdb)
|
||||
})
|
||||
autoDeleteWdbCheckbox.SetChecked(prefs.AutoDeleteWdb)
|
||||
launcher.AutoDeleteWdb = prefs.AutoDeleteWdb
|
||||
@@ -69,7 +69,7 @@ func createOptionsComponents() {
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.EnvironmentVariables = text
|
||||
utils.SavePrefs(prefs)
|
||||
debug.Printf("Environment variables updated: %v", launcher.CustomEnvVars)
|
||||
log.Debug().Msgf("Environment variables updated: %v", launcher.CustomEnvVars)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +126,7 @@ func createBottomBar(myWindow fyne.Window) fyne.CanvasObject {
|
||||
githubURL := "https://git.burkey.co/eburk/epochsilicon"
|
||||
parsedURL, err := url.Parse(githubURL)
|
||||
if err != nil {
|
||||
debug.Printf("Error parsing git URL: %v", err)
|
||||
log.Debug().Msgf("Error parsing git URL: %v", err)
|
||||
return
|
||||
}
|
||||
fyne.CurrentApp().OpenURL(parsedURL)
|
||||
@@ -198,7 +198,7 @@ func createWineRegistryComponents() {
|
||||
}()
|
||||
|
||||
if err := utils.SetOptionAsAltEnabled(true); err != nil {
|
||||
debug.Printf("Failed to enable Option-as-Alt mapping: %v", err)
|
||||
log.Debug().Msgf("Failed to enable Option-as-Alt mapping: %v", err)
|
||||
// Update UI on main thread
|
||||
fyne.Do(func() {
|
||||
stopPulsingEffect()
|
||||
@@ -206,7 +206,7 @@ func createWineRegistryComponents() {
|
||||
})
|
||||
time.Sleep(2 * time.Second) // Show error briefly
|
||||
} else {
|
||||
debug.Printf("Successfully enabled Option-as-Alt mapping")
|
||||
log.Debug().Msgf("Successfully enabled Option-as-Alt mapping")
|
||||
// Update preferences
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.RemapOptionAsAlt = true
|
||||
@@ -240,7 +240,7 @@ func createWineRegistryComponents() {
|
||||
}()
|
||||
|
||||
if err := utils.SetOptionAsAltEnabled(false); err != nil {
|
||||
debug.Printf("Failed to disable Option-as-Alt mapping: %v", err)
|
||||
log.Debug().Msgf("Failed to disable Option-as-Alt mapping: %v", err)
|
||||
// Update UI on main thread
|
||||
fyne.Do(func() {
|
||||
stopPulsingEffect()
|
||||
@@ -248,7 +248,7 @@ func createWineRegistryComponents() {
|
||||
})
|
||||
time.Sleep(2 * time.Second) // Show error briefly
|
||||
} else {
|
||||
debug.Printf("Successfully disabled Option-as-Alt mapping")
|
||||
log.Debug().Msgf("Successfully disabled Option-as-Alt mapping")
|
||||
// Update preferences
|
||||
prefs, _ := utils.LoadPrefs()
|
||||
prefs.RemapOptionAsAlt = false
|
||||
|
Reference in New Issue
Block a user