Skip to content

Commit

Permalink
actually fix the windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
pgavlin committed Nov 2, 2022
1 parent d4d5e08 commit f4a927c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pkg/backend/display/sigint_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package display

import (
"fmt"
"os"
"syscall"

Expand All @@ -30,14 +31,14 @@ func init() {
if err != nil {
panic(fmt.Errorf("loading kernel32.dll: %w", err))
}
proc, err := d.FindProc("GenerateConsoleCtrlEvent")
proc, err := dll.FindProc("GenerateConsoleCtrlEvent")
if err != nil {
panic(fmt.Errorf("finding GenerateConsoleCtrlEvent: %w", err))
}
generateConsoleCtrlEvent = proc
}

func sigint() {
_, _, err := generateConsoleCtrlEvent.Call(syscall.CTRL_BREAK_EVENT, uintpr(os.GetPid()))
_, _, err := generateConsoleCtrlEvent.Call(syscall.CTRL_BREAK_EVENT, uintptr(os.Getpid()))
contract.IgnoreError(err)
}

0 comments on commit f4a927c

Please sign in to comment.