From 62453daa17edfb4932c999f21f23715a8d5cd204 Mon Sep 17 00:00:00 2001 From: Liam Galvin Date: Fri, 17 Dec 2021 09:27:35 +0000 Subject: [PATCH] Fix stupid input bug (#330) * Fix stupid input bug * Fix build --- .github/workflows/test.yml | 1 + internal/app/darktile/config/default.go | 2 +- internal/app/darktile/gui/gui.go | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f280d5a..41eff4e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,5 +16,6 @@ jobs: uses: actions/checkout@v2 - name: Test run: | + sudo apt update sudo apt install xorg-dev libgl1-mesa-dev DISPLAY=:0 go test -mod=vendor ./... diff --git a/internal/app/darktile/config/default.go b/internal/app/darktile/config/default.go index 55d2183..64f6f6a 100644 --- a/internal/app/darktile/config/default.go +++ b/internal/app/darktile/config/default.go @@ -35,7 +35,7 @@ var defaultTheme = Theme{ BrightMagenta: "#c397d8", BrightCyan: "#70c0b1", BrightWhite: "#eaeaea", - Background: "#1d1f21", + Background: "#000000", Foreground: "#c5c8c6", SelectionBackground: "#33aa33", SelectionForeground: "#ffffff", diff --git a/internal/app/darktile/gui/gui.go b/internal/app/darktile/gui/gui.go index cbc64b7..a2614c0 100644 --- a/internal/app/darktile/gui/gui.go +++ b/internal/app/darktile/gui/gui.go @@ -103,7 +103,7 @@ func (g *GUI) watchForUpdate() { for range g.updateChan { ebiten.ScheduleFrame() go func() { - for g.keyState.AnythingPressed() { + if g.keyState.AnythingPressed() { time.Sleep(time.Millisecond * 10) ebiten.ScheduleFrame() }