Fix stupid input bug (#330)

* Fix stupid input bug

* Fix build
This commit is contained in:
Liam Galvin 2021-12-17 09:27:35 +00:00 committed by GitHub
parent 97b6a41eb3
commit 62453daa17
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 2 deletions

View File

@ -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 ./...

View File

@ -35,7 +35,7 @@ var defaultTheme = Theme{
BrightMagenta: "#c397d8",
BrightCyan: "#70c0b1",
BrightWhite: "#eaeaea",
Background: "#1d1f21",
Background: "#000000",
Foreground: "#c5c8c6",
SelectionBackground: "#33aa33",
SelectionForeground: "#ffffff",

View File

@ -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()
}