From 1298721c6ede7845ab20f717a37e10b507883e48 Mon Sep 17 00:00:00 2001 From: Wieku Date: Thu, 29 Dec 2022 23:25:32 +0100 Subject: [PATCH 1/3] Update dialog package, fixes Browse button freeze --- go.mod | 7 +++++-- go.sum | 8 ++++---- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/go.mod b/go.mod index 9b4393dd..39f4f42c 100644 --- a/go.mod +++ b/go.mod @@ -41,7 +41,10 @@ require ( golang.org/x/exp v0.0.0-20220312040426-20fd27f61765 ) -require github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf // indirect +require ( + github.com/TheTitanrain/w32 v0.0.0-20180517000239-4f5cfb03fabf // indirect + github.com/rodrigocfd/windigo v0.0.0-20221212040622-0d5f23c1b18a // indirect +) require ( //github.com/neclepsio/imgui-go/v4 v4.0.0-20220215070259-092710ff7bb1 @@ -51,4 +54,4 @@ require ( replace github.com/inkyblackness/imgui-go/v4 => github.com/neclepsio/imgui-go/v4 v4.0.0-20220215070259-092710ff7bb1 -replace github.com/sqweek/dialog => github.com/wieku/dialog v0.0.0-20220624021813-6651e87950e9 +replace github.com/sqweek/dialog => github.com/wieku/dialog v0.0.0-20221229220948-2d1daf4d8f13 diff --git a/go.sum b/go.sum index a330722b..fb029107 100644 --- a/go.sum +++ b/go.sum @@ -22,8 +22,6 @@ github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWp github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU= github.com/go-gl/gl v0.0.0-20210813123233-e4099ee2221f h1:s0O46d8fPwk9kU4k1jj76wBquMVETx7uveQD9MCIQoU= github.com/go-gl/gl v0.0.0-20210813123233-e4099ee2221f/go.mod h1:wjpnOv6ONl2SuJSxqCPVaPZibGFdSci9HFocT9qtVYM= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be h1:vEIVIuBApEBQTEJt19GfhoU+zFSV+sNTa9E9FdnRYfk= -github.com/go-gl/glfw/v3.3/glfw v0.0.0-20210727001814-0db043d8d5be/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b h1:GgabKamyOYguHqHjSkDACcgoPIz3w0Dis/zJ1wyHHHU= github.com/go-gl/glfw/v3.3/glfw v0.0.0-20221017161538-93cebf72946b/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-gl/mathgl v1.0.0 h1:t9DznWJlXxxjeeKLIdovCOVJQk/GzDEL7h/h+Ro2B68= @@ -56,6 +54,8 @@ github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZb github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY= github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc= +github.com/rodrigocfd/windigo v0.0.0-20221212040622-0d5f23c1b18a h1:+/u9AW3UEcs12ow7X52KvdHMc5n0nwwsHLvmUPhH7sU= +github.com/rodrigocfd/windigo v0.0.0-20221212040622-0d5f23c1b18a/go.mod h1:MW/87P744bxkvl5bw4PIAt9OHy56IyIqIRcotQUpG50= github.com/shirou/gopsutil v3.21.7+incompatible h1:g/wcPHcuCQvHSePVofjQljd2vX4ty0+J6VoMB+NPcdk= github.com/shirou/gopsutil v3.21.7+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= github.com/sirupsen/logrus v1.7.0/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0= @@ -71,8 +71,8 @@ github.com/tklauser/go-sysconf v0.3.8/go.mod h1:z4zYWRS+X53WUKtBcmDg1comV3fPhdQn github.com/tklauser/numcpus v0.2.3/go.mod h1:vpEPS/JC+oZGGQ/My/vJnNsvMDQL6PwOqt8dsCw5j+E= github.com/tklauser/numcpus v0.3.0 h1:ILuRUQBtssgnxw0XXIjKUC56fgnOrFoQQ/4+DeU2biQ= github.com/tklauser/numcpus v0.3.0/go.mod h1:yFGUr7TUHQRAhyqBcEg0Ge34zDBAsIvJJcyE6boqnA8= -github.com/wieku/dialog v0.0.0-20220624021813-6651e87950e9 h1:2+fFqPcZCEsZNmy+NinIJZGWIGOLbCxwPdIfP1ZqHlI= -github.com/wieku/dialog v0.0.0-20220624021813-6651e87950e9/go.mod h1:/qNPSY91qTz/8TgHEMioAUc6q7+3SOybeKczHMXFcXw= +github.com/wieku/dialog v0.0.0-20221229220948-2d1daf4d8f13 h1:nEweqtA5ItHRdK+eAIXg93qmhpVT7lCfjlewe6dJMDM= +github.com/wieku/dialog v0.0.0-20221229220948-2d1daf4d8f13/go.mod h1:WwGLImngYk6muW1mZ84t7VD9LWUX6yCtVJbTXk75r8o= github.com/wieku/rplpa v0.0.0-20210919131836-bff7a920f6e1 h1:IBfA+cAja6jBYBoUXmgrPsOTG6bcV4mhKVpZz8/uf3Q= github.com/wieku/rplpa v0.0.0-20210919131836-bff7a920f6e1/go.mod h1:Lk/V/AJfEHrusnmshAeqt7FQiOnFK9T3BtEGWkNmWY0= golang.org/x/exp v0.0.0-20220312040426-20fd27f61765 h1:p80Xjx7+xLY3+FFWW3KSo34VwQwWFdSKANfks5INL2g= From c9237f21fa020d1cc0679408a5d7da5cfc619ce9 Mon Sep 17 00:00:00 2001 From: Wieku Date: Thu, 29 Dec 2022 23:30:51 +0100 Subject: [PATCH 2/3] Change default oversample mult to 16 and blend frames to 24 --- app/settings/recording.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/settings/recording.go b/app/settings/recording.go index 17bc4c85..9b7e9d5c 100644 --- a/app/settings/recording.go +++ b/app/settings/recording.go @@ -93,8 +93,8 @@ func initRecording() *recording { ShowFFmpegLogs: true, MotionBlur: &motionblur{ Enabled: false, - OversampleMultiplier: 3, - BlendFrames: 5, + OversampleMultiplier: 16, + BlendFrames: 24, BlendFunctionID: 27, GaussWeightsMult: 1.5, }, From 413a533707464aa74c06b5e962a01e2fcc09973d Mon Sep 17 00:00:00 2001 From: Sebastian Krajewski Date: Sat, 7 Jan 2023 01:38:27 +0100 Subject: [PATCH 3/3] Don't start the watcher if dir doesn't exist --- launcher/beatmapdirwatcher.go | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/launcher/beatmapdirwatcher.go b/launcher/beatmapdirwatcher.go index c83e432b..845068d8 100644 --- a/launcher/beatmapdirwatcher.go +++ b/launcher/beatmapdirwatcher.go @@ -4,6 +4,7 @@ import ( "github.com/fsnotify/fsnotify" "github.com/wieku/danser-go/framework/goroutines" "log" + "os" "path/filepath" ) @@ -12,6 +13,13 @@ var watcher *fsnotify.Watcher func setupWatcher(file string, callback func(event fsnotify.Event)) { var err error + abs, _ := filepath.Abs(file) + + _, err1 := os.Lstat(abs) + if err1 != nil { // Beatmap dir not found, abort + return + } + watcher, err = fsnotify.NewWatcher() if err != nil { log.Fatal(err) @@ -39,8 +47,6 @@ func setupWatcher(file string, callback func(event fsnotify.Event)) { } }) - abs, _ := filepath.Abs(file) - err = watcher.Add(abs) if err != nil { log.Fatal(err)